A Multi-Manager for SAFE DOS V2.52

Since the final additions have been made to SAFE DOS, I have had several requests to write a “do-all” disk management program that includes all these features, plus the file-indexing provided by DOS_DEX and AUTO_DEX. It seemed to me to be more practical to call these file-indexing routines and the disk-verify routine from the initial <LOAD> menu and from the MULTI_MANAGER menu than to integrate them all into one program.

To make it possible to utilize only one set of data for both DOS_DEX and AUTO_DEX, the original DOS_DEX was revised to save DATA c$() arrays instead of the entire routine with variables. This in turn required finding a way to preserve current variables whenever a new file directory was installed by the machine code routine. I utilized the UDG file for this, eg: POKE USR “D” and PEEK USR “d” which saves several bytes compared to using the usual PEEK/POKE syntax. The underlined “D” must be entered in GRAPHIC mode but not the lower-case “d”.

Some have wondered why the fast FOR/NEXT loop was not used in these routines. Actually, because of the various key-stroke tests and item-numbering very little gain in display speed is obtained by this, but for anyone who is interested, the eighth REM byte may be changed to a 14 to allow for a LET m=SGN PI definition before the DIM c$ (VAL “178”,VAL “20”). An easy way to do this with the original DOS_DEX listing is to insert a line 6 STOP. Key RUN, then POKE (a+7),14. Remove line 6, make the m definition between CLEAR and DIM c$() and revise all the m loops.

Note that this fast FOR/NEXT definition is NOT provided in the revised DOS_DEX listing given below. To move the REM statement to line 0 if you are starting with the original listing, POKE 26711,0. (Refer to April UPDATE for poking the machine code to a REM line from scratch.) As given, the listing provides for a two-drive system, 0 and 1, at lines 1 and 522, which may be changed if you prefer to designate other drives. Omit these drive designations if you have a single-drive system.

After the ERASE function appeared for SDOS v2.52, I found that the CHR$ 229 ” RESTORE ” test I had used in the original AUTO_DEX, VERI_DISK, and MARK_MOVE listings would not work after an ERASE had been used on a disk. Upon checking with John Oliger, I learned that a CHR$ 128 in the first byte of the first unused file directory is what must be looked for. So, in all the original listings, wherever ” RESTORE ” appears the respective lines should be changed to IF CODE c$(n)> VAL “127” … or IF CODE c$(K)> VAL “127”… or IF CODE c$(M)> VAL “127” or IF CODE c$(m)> VAL “127”….

The MULTI_MANAGER listing does not utilize the fast FOR/NEXT loop either, so when entering the listing be sure that the eighth byte of the line 1 REM is an 8 and not a 14 as described previously if you are starting with a copy of the DOS_DEX machine code in line 1 REM. The program prompts should be self-explanatory–I HOPE! Note the warning given in the SDOS User Manual (p. 37a in the final edition) that the MOVE / command to transfer an entire disk must be used only with identical drives, otherwise the MARK_MOVE method is the only safe way to do it. The MULTI_MANAGER menu assumes that DOS_DEX resides in file zero and that AUTO_DEX and VERI_DISK are on the same disk, preferably with AUTO_DEX in file 1.

These routines are available on an UPDATE issue disk.

TWO-DRIVE DOS_DEX WITH DATA-SAVE

TWO-DRIVE DOS_DEX WITH DATA-SAVE listing, lines 0-520
TWO-DRIVE DOS_DEX WITH DATA-SAVE listing, lines 0-520
TWO-DRIVE DOS_DEX WITH DATA-SAVE listing, lines 522-700
TWO-DRIVE DOS_DEX WITH DATA-SAVE listing, lines 522-700

MULTI_MANAGER

MULTI_MANAGER listing, lines 1-60
MULTI_MANAGER listing, lines 1-60
MULTI_MANAGER listing, lines 60-520
MULTI_MANAGER listing, lines 60-520
MULTI_MANAGER listing, lines 530-9999
MULTI_MANAGER listing, lines 530-9999