Classic Computer Magazine Archive ANTIC VOL. 5, NO. 8 / DECEMBER 1986

Tech Tips


BY BILL MARQUARDT, ANTIC TECHNICAL ASSISTANT

This month's Tech Tips will explain some handy ways to modify Atari DOS 2.0 for special purposes. DOS 2 is older than DOS 2.5 and the not-recommended DOS 3, but it is still the most commonly used official Atari Disk Operating System. And it serves as the standard for DOS compatibility. DOS 2 is the operating system you will find on each month's Antic Disk.

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. We found this tip from Jerry White in the August, 1986 newsletter of the Lawrence Atari Computer Club.

The next tips appeared in various users group newsletters and were credited to the sysop of the Atlantis BBS.

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? This short routine by Sally Nagy appeared in the newsletter of the Capitol Hill Atari Owners Society (CHAOS):

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


If you have a Tech Tip that you would like to share with other readers, send it along to Antic Tech Tips, 524 Second Street, San Francisco, CA 94107. You might get your name in print. We always welcome very short programs that demonstrate the Atari's powers simple hardware modifications or useful macros for popular software.