Classic Computer Magazine Archive ANTIC VOL. 7, NO. 7 / NOVEMBER 1988

RAMdisk Sentry

Save your files, re-install without re-formatting By Glenn Smith

RAMdisk Sentry is a short program that re-installs a locked-up RAM-disk without formatting it-thus retaining any files that were present in the RAMdisk before rebooting. This BASIC program works on 8-bit Atari computers with disk drive and enough memory to support a DOS 2.5 RAMdisk.

Don't you just hate it when for some mysterious reason you can't access your RAMdisk files? And don't you just hate it lots when you save your only copy of a file to your RAMdisk press the [RESET] key and reboot your computer, thereby destroying everything on the RAMdisk? If any of this sounds familiar, read on.

Many of you have noticed by now that when you boot DOS 2.5 with the RAMDISK.COM file present, it always formats the RAMdisk-which may not be what you had in mind. RAM-disk Sentry works automatically when you load it from DOS. It reinstalls a RAMdisk without formatting it. This means any RAMdisk files existing before the reboot will remain in the RAMdisk. The RAMdisk Sentry program also tells DOS whether or not the RAMdisk contains DUP.SYS.

NOTE: RAMdisk Sentry won't recover a RAMdisk if you turn off your computer. It works only if the computer remains powered up-and only if you are using Atari DOS 2.5.

GETTING STARTED
Prevent lost RAMdisks. Type in Listing 1, NOFORMAT.BAS, check it with TYPO II and SAVE a copy before you RUN it. The BASIC listing will create a file called RAMDISK.OBJ, which can be loaded from the DOS menu using the L selection, or renamed AUTORUN.SYS. Listing 2, the MAC/65 source code, shows assembly language programmers how the RAM-disk is installed.

If you decide to use the program as an AUTORUN.SYS, make sure your original Atari RAMDISK.COM file is not on the DOS disk, because RAMDISK.COM will format the RAMdisk and erase all the files. If you rename the RAMdisk Sentry file to RAMDISK.COM, it will be executed just like the original, except that it won't format the RAMdisk-and any AUTORUN.SYS will also be executed.

These automatic loading methods work best if you plan to reboot your computer without turning it off. You can do this by returning to BASIC, typing a POKE 580,1 (setting the coldstart flag) and pressing [RESET]. Or you can do it from DOS by typing M (run at address) followed by E477 (the coldstart address). The computer will boot as usual, except that the RAM-disk will still contain all of your files.

I use the reboot method when switching between Turbo BASIC and Atari BASIC. This way, I never have to save my BASIC programs to a floppy disk until I know they work. It also saves time because I load Turbo BASIC from the RAMdisk each time I return from Atari BASIC. I also use it when I somehow manage to destroy DOS and have no choice but to reboot.


Glenn Smith of Grand Junction, Colorado is the author of Class Scheduler from the September 1988 Antic

Listing 1: NOFORMAT.BAS(not needed)
Listing 2: NOFORMAT.M65 Download / View

On Disk: RAMDISK.OBJ Download