Classic Computer Magazine Archive COMPUTE! ISSUE 79 / DECEMBER 1986 / PAGE 71

Atari DOS Switcher

Jonathan Gluck

This short program makes the Atari DOS 2.5 menu appear instantly whenever you need it—without destroying the program you've been working on. For Atari computers with at least 64K.

If you use Atari DOS 2.5, you've probably spent a lot of time staring at the screen waiting for the menu to appear. When the menu has come and gone, so has the BASIC program you were working on—unless, of course, you have the MEM.SAV file on the disk, which makes the whole process take even longer. Many programmers simply save the program to disk, call the DOS menu, then load the program back into memory. But if you forget to save your program, it's lost for good.

"DOS Switcher" allows you to switch back and forth between BASIC and the DOS 2.5 menu whenever you like, without losing the program in memory. It's also useful for 130XE owners who want to use the machine's expanded memory for something besides a RAMdisk. (The program works only on computers that have at least 64K of memory. This includes the 800XL, 65XE, and 130XE, but does not include the Atari 400, 800, or unexpanded 600XL.)

Instant DOS Menu

Type in and save DOS Switcher. When you run the program, it creates a binary object file named SWITCH.OBJ, To use DOS Switcher, type DOS and press RETURN to bring up the usual DOS 2.5 menu. If you have a MEM.SAV file on the disk, delete it; you won't need MEM.SAV now that DOS Switcher is available. Type L and press RETURN; then type SWITCH.OBJ and press RETURN to install DOS Switcher. After the screen has blinked, enter B to go back to BASIC.

DOS Switcher is now active. To see it work, type in a short BASIC program like this one:


After you've entered the program, type DOS and press RETURN. The DOS 2.5 menu appears instantly. Enter B to go back to BASIC; then LIST the program to confirm that it's still safe in memory. Now the DOS menu is available whenever you need it, without threatening your BASIC programs.

DOS Switcher works by hiding the DOS menu (the visible part of DOS, also called the Disk Utilities Package or simply DUP) underneath the operating system in a protected area of RAM. Whenever you enter the DOS command from BASIC, Switcher moves your program to a safe RAM area and moves the DOS menu into RAM where it can execute. When you exit the menu. Switcher simply switches your program and the DOS menu back to their original locations.

DOS Switcher

For Instructions on entering this program, please refer to "COMPUTEI's Guide to Typing In Programs" In this Issue of COMPUTEI.

NB 100 OPEN #1,8,0, "D1 : SWITCH.OBJ"

FL 110 TRAP 200


6H 130 PUT #1,Z

6B 140 GOTO 120

FM 200 CLOSE #1


NK 1000 DATA 255,255,0,64,57,64,169,0,141,14

BL 1010 DATA 212,120,167,0,141,0,212,173,1,211

DB 1020 DATA 41,254,141,1,211,162,0,189,124,29

KG 1030 DATA 157,0,224,232,208,247,238,23,64,238

6N 1040 DATA 26,64,173,23,64,201,52,208,232,173

J6 1050 DATA 1,211,9,1,141,1,211,169,64,141

HJ 1060 DATA 14,212, 88,96,226,2,227,2,0,64

EC 1070 DATA 115,24,117,24,160,1,96,247,23,249

NE 1080 DATA 23,76,117,32,70,23,143,23,169,0

EO 1090 DATA 141,14,212,120,141,0,212,173,1,211

6B 1100 DATA 41,254,141,1,211,169,29,141,107,23

PA 1110 DATA 141,114,23,169,224,141,111,23,141,118

EF 1120 DATA 23,162,0,189,124,29,168,189,0,224

N6 1130 DATA 157,124,29,152,157,0,22 4,232,208,239