DOS 2.0 Modification for special purposes

 


First, a few words of CAUTION: The following enhancements were designed specifically for Atari DOS 2.
We don\'t know exactly what would happen if you try these changes any other DOS, but we doubt if the
results would be anything good. And be sure to keep a backup copy of original DOS 2, in case you
later change your mind about using any of these modifications.

DUPLICATE FILENAMES
One problem with DOS 2 is that it is possible to rename a file to an existing filename. If you attempt
to delete or rename one of them, they will both be deleted or renamed. Here is a solution to this problem.

Take a disk with the DOS.SYS and DUP.SYS files on it. Put it in your drive and turn on your computer.
At the READY prompt, type POKE 3117,234 and POKE 3118,234. Then type DOS. This patch will let you
rename the first file without affecting the second when using option E from the DOS menu.

ERROR 164
You will see Error 164 (File Number Mismatch) if your file is scrambled. Normally, your computer won\'t
allow you to see the file and you are hopelessly lost if this was your only copy. However, if you do a
POKE 4148,234: POKE 4149,234 you will be able to LOAD your file, garbage and all, and correct it! Be
sure to SAVE the corrected file to another disk and avoid using the damaged version.

OVER TWO DRIVES
You must tell DOS that you have more than two drives attached to your system if you want to access them.
Location 1802 is the flag for this purpose. Each bit in the byte stored there represents a drive.
Setting a bit will allow DOS to access the corresponding drive.

Normally, the lowest two bits are set, so you would find a 3 in location 1802. By POKEing in a 7 you set
DOS for three drives, and by POKEing in 15, you set DOS for four drives. This is because the bit patterns
are 0111 and 1111 respectively This is a change that should be made permanent by re-writing DOS to disk
after the POKE. You can access as many as eight drives. But keep in mind that every drive you add
requires 128 bytes of memory to store its buffer.

OPEN FILE LIMITS
DOS limits you to three simultaneously open files. But if you find this restrictive, you can expand the
limit to seven by simply doing a POKE 1801,7. A buffer of 128 bytes is used for each file.
Use a number less than seven if you don\'t want to give up all that valuable RAM.

LOWERCASE FILENAMES
If you are bored with all uppercase filenames try this: POKE 3818,48:POKE 3822,123. Now you can use any
ATASCIT character from CHR(48) to CHR(122) ("0" to "z"). Note that the second POKE value is the ATASCII
value plus one. It is not recommended to go above or below these values.

CHANGING WILDCARDS
This tip is of dubious value, but if you would like your wildcard character to be something other than
the asterisk [*], POKE 3783 with the ATASCII value of your chosen character.

PERMANENT POKES
Remember that all the above POKEs are made from BASIC in the immediate mode. You do not need line
numbers. The changes can then be made permanent by typing DOS to go to the DOS menu and using option H to
rewrite your modified version of DOS to disk.

DIRECTORY TEXT
Would you like to create a text file on your disk that contains the directory?

10 DIM A$(20),B$(1280)
20 OPEN #1,6,0,"D:*.*":TRAP 80
40 INPUT #1;A$:B$(LEN(B$)+1)=A$
60 GOTO 40
80 CLOSE #1:OPEN #1,8,0,"D:DISKDIR"
90 B$(LEN(B$)+1)=" ":B$(LEN(B$)+1)=A$
110 M=17:FOR N=1 TO LEN(B$)/M
130 PRINT #1,B$((N-1)*M+1,N*M)
140 NEXT N:CLOSE #1