[comp.sys.atari.8bit] Sparta 3.2 command renamer

fseipel@magnus.acs.ohio-state.edu (Frank E Seipel) (05/07/91)

2 REM SpartaDOS v3.2 Command Changer
4 REM Frank Seipel 5-2-91
6 IF PEEK(3830)+PEEK(3831)<>234 THEN 4000
10 DIM C$(10),C2$(200):W=1000
20 C$="COPY":GOSUB W:REM COPY
30 C$="LOAD":GOSUB W:REM LOAD
40 C$="SAVE":GOSUB W:REM SAVE
50 C$="APPEND":GOSUB W:REM APPEND
60 C$="CWD":GOSUB W:REM CWD
70 C$="ERASE":GOSUB W:REM ERASE
80 C$="RENAME":GOSUB W:REM RENAME
90 C$="CREDIR":GOSUB W:REM CREDIR
100 C$="DELDIR":GOSUB W:REM DELDIR
110 C$="CAR":GOSUB W:REM CAR
120 C$="RUN":GOSUB W:REM RUN
130 C$="PRINT":GOSUB W:REM PRINT
140 C$="TYPE":GOSUB W:REM TYPE
150 C$="DIR":GOSUB W:REM DIR
160 C$="DIRS":GOSUB W:REM DIRS
170 C$="MEM":GOSUB W:REM MEM
180 C$="PAUSE":GOSUB W:REM PAUSE
190 C$="VERIFY":GOSUB W:REM VERIFY
200 C$="BOOT":GOSUB W:REM BOOT
210 C$="CHKDSK":GOSUB W:REM CHKDSK
220 C$="PROTECT":GOSUB W:REM PROTECT
230 C$="UNPROTECT":GOSUB W:REM UNPROTECT
240 C$="LOCK":GOSUB W:REM LOCK
250 C$="UNLOCK":GOSUB W:REM UNLOCK
260 C$="XDIV":GOSUB W:REM XDIV
270 C$="AINIT":GOSUB W:REM AINIT
272 C$="?DIR":GOSUB W:REM ?DIR
274 C$="BASIC":GOSUB W:REM BASIC
275 C$="TIME":GOSUB W:REM TIME
276 C$="DATE":GOSUB W:REM DATE
277 C$="TD":GOSUB W:REM TD
278 C$="KEY":GOSUB W:REM KEY
280 IF LEN(C2$)>147 THEN 5000
290 FOR I=3833 TO 3832+LEN(C2$)
292 POKE I,ASC(C2$(I-3832)):NEXT I:? 
300 ? "New commands written to RAM."
310 ? "type SAVE 0EF9 0F8B from DOS"
320 ? "command line to make commands"
330 ? "directly loadable from DOS."
340 END 
1000 C2$(LEN(C2$)+1)=C$:Z=LEN(C2$)
1010 C2$(Z)=CHR$(ASC(C2$(Z))+128)
1020 RETURN 
2000 REM 
2010 REM To change SpartaDOS
2020 REM commands, simply edit the
2030 REM C$="..." definitions in
2040 REM lines 10-278. The actual
2050 REM SpartaDOS command appears
2060 REM in the REM segment of each
2070 REM of these lines.
2080 REM 
2090 REM You can also have several
2100 REM command sets available and
2110 REM switch between them from
2120 REM DOS without running this
2130 REM program every time. To do
2140 REM this, you simply RUN this
2150 REM program and then use the
2160 REM SAVE command from SpartaDOS.
2170 REM Simply go to DOS and type:
2180 REM 
2190 REM SAVE file.COM 0EF9 0F8B
2200 REM where "filename" is the name
2210 REM of your command set. Then
2220 REM type:
2230 REM 
2240 REM LOAD file.COM
2250 REM 
2260 REM from the command line to
2270 REM load in the alternate
2280 REM command set. This allows you
2290 REM to switch back and forth
2300 REM between your own and the
2310 REM original version, possibly
2320 REM useful for batch files
2330 REM which use the old commands.
2340 REM To have the computer use
2350 REM your altered command set
2360 REM automatically, simply create
2370 REM a STARTUP.BAT file
2380 REM containing "LOAD file.COM"
2390 REM as a command. Do not omit
2400 REM the LOAD!
2410 REM 
4000 ? :? "Must be using SpartaDOS 3.2!":END 
5000 ? :? "CAN'T OUTPUT -- must shorten"
5010 ? "the commands by ";LEN(C2$)-147;" bytes.":END 
5020 END 
 
 SI
 Simple program to "rename" Sparta
3.2 commands. ENTER from BASIC, then
RUN. See documentation block for
further details.