Classic Computer Magazine Archive COMPUTE! ISSUE 26 / JULY 1982 / PAGE 121

Apple DOS Changer

Robert Swirsky
Cedarhurst, NY

A disaster-prevention technique for Apple Disk systems. Teachers should find this especially valuable. For DOS 3.3 with 48K RAM.

If there is an Apple in a classroom, there is usually a student who gets immense pleasure out of typing "INIT" and watching the drive whir and click as it erases the disk!

There is a strange phenomenon which occurs when you mix microcomputers and young people. Most of them will treat the computer with reasonable care, but there is always someone who feels compelled to try to "mess up" the computer's files.

I know from experience; I used to be such a student. What can be done to stop people from tampering with dangerous DOS commands? The answer is simple – just change the names of commands that you don't want available to users. Since the DOS is stored in RAM, it is relatively easy to find the table of commands, and modify it accordingly.

This program will change the DOS commands. When run, it displays each command followed by a prompt. If you want to change the command, just type in your revision. To leave it unmodified, hit the RETURN key. The next DOS command will be displayed, and the same procedure is followed.

A few words of caution are needed. First of all, don't make the new commands so that they match the beginnings of other commands. For example, if you change "CATALOG" to "C", conflicts will arise if you try to use the CLR, CLOSE, or other commands that begin with C. Second, don't put spaces in your command. This tends to make strange things happen. Also, avoid making your commands excessively long. There is only so much room in memory for the command table. Note, however, that the commands can be of different lengths from the original ones.

How To HAHA A Disk

The program will work on DOS 3.3 with 48K of RAM. It will not work with less than 48K, without changing the addresses that the changes are POKEd to. Since the vast majority of Apple owners have the 48K, this is hardly a limitation.

After the program is RUN, the changes can be saved as a permanent part of DOS. Insert a blank disk, and type the INIT command, followed by the correct parameters. Of course, if you have changed the INIT itself to something else, you would type that in instead. When the initialization is completed, the disk will have your DOS modifications stored on it. Whenever DOS is booted from that disk, your custom commands will be the ones that the Apple knows.

A great deal of protection is offered with this program. If you decide to change INIT to HAHA, nobody can init the disk. Anyone who tries will be greeted with a ?SYNTAX ERROR (beep). However, when you go to HAHA your disk, you will be successful.

0 ON ERR GOTO 1000
1 DIM CO$(28)
2 P = 1
10 FOR X = 43140 TO 43271
20 CO$(P) = CO$(P) + CHR$ ( PEEK (X))
31 IF  PEEK (X) > 128 THEN P = P + 1
32 IF P = 28 THEN 70
40 NEXT
70 HOME
80 PRINT "DOS CHANGER BY ROBERT A. SWIRSKY"
160 VTAB 24 : PRINT "HIT "C’ TO CONTINUE" ; : ~ GET R$: IF R$ < > "C" THEN 160
170 HOME
180 PRINT : PRINT "YOU WILL SEE ALL 28 DOS ~ COMMANDS"
190 PRINT "IF YOU WISH TO LEAVE IT UNCHANGED, PRESS RETURN"
200 PRINT "TO CHANGE THE COMMAND, SIMPLY RETYPE IT WITH YOUR CHOICE."
210 PRINT : PRINT
220 LL = 43139
221 HL = 43271
230 FOR Q = 1 TO 28
235 PRINT CO$(Q);
240 PRINT TAB( 20) ; "--> " ;
250 INPUT R$
260 IF R$ = "" THEN R$ = CO$(Q)
261 IF LEN (R$) = 1 THEN  PRINT "PLEASE -- TWO OR MORE LETTERS" : GOTO 240
270 FOR W = 1 TO LEN (R$) -1
280 POKE LL + W, ASC ( MID$ (R$, W, 1))
290 NEXT
295 IFASC(RIGHT$(R$, 1)) > 127 THEN POKE LL + W, ASC (RIGHT$(R$, 1)) : GOTO 501
300 POKE LL + W, ASC(RIGHT$(R$, 1)) + 128
501 REM
510 LL = LL + W
520 IF LL > HL THEN 600
530 W = 0
599 NEXT
600 PRINT "CHARACTER LIMIT EXCEEDED"
1000 PRINT "RUN TERMINATED"                                      C