10
20
30 :
40 IF HIMEM>&FFFF:SYS "OS_GetEnv"TOA$:IFLEFT$(A$,5)<>"B6502":OSCLI"B6502"+MID$(A$,INSTR(A$," "))
50 DIM mem% &3FFF:OSCLI "LOAD MOS120 "+STR$~mem%
60 DEFFNo(A%):P%=A%:O%=P%-&C000+mem%:=opt%
70 :
80 OSWRCH=&FFEE
90 LFA4A=&FA4A:LF168=&F168
100 :
110 FOR P=0 TO 1:opt%=P*3+4
120 [OPT FNo(&C4A0):EQUB &35:] :
130 [OPT FNo(&E825):EQUS "OS 1.21":] :
140 [OPT FNo(&F0C2):EQUS "OS 1.21":] :
150 :
160
170 [OPT FNo(&DB11):BCS &DB27:EQUS STRING$(&DB27-P%,CHR$&EA):]:
180 [OPT FNo(&DD6F):JMP &DE7F:EQUS STRING$(&DDCA-P%,CHR$&EA):]:
190 [OPT FNo(&DE1A):JMP &DE2B:EQUS STRING$(&DE2B-P%,CHR$&EA):]:
200 [OPT FNo(&E633):EQUW &FFA6:EQUW &FFA6:] :
210 [OPT FNo(&E830):NOP:NOP:NOP:NOP:] :
220 [OPT FNo(&E88B):PLA:JSR &E4B0:PLA:JSR &E4B0 :\ Insert into sound buffer
230 PLP:RTS :\ Restore flags and return
240 EQUS STRING$(&E8AE-P%,CHR$&EA):] :
250 [OPT FNo(&EE13):LDA #&FF:] :
260 [OPT FNo(&EE1E):CPY #&10:BCC &EE59:RTS :\ Only search ROMFS
270 EQUS STRING$(&EE51-P%,CHR$&EA):] :
280 [OPT FNo(&EE55):NOP:NOP:] :
290 [OPT FNo(&EE62):EQUS STRING$(&EEAD-P%,CHR$&EA):] :
300 [OPT FNo(&EEBB):EQUS STRING$(&EEDA-P%,CHR$&EA):] :
310 [OPT FNo(&F075):EQUS STRING$(6,CHR$0):] :
320 :
330
340 [OPT FNo(&E895) :\ Replacement *Help
350 .LE895
360 LDA #11:JSR OSWRCH :\ Move up a line
370 LDX #&09:JSR LF168 :\ Send service call 9 to ROMs
380 JSR LFA4A :\ Print inline message, corrupting &B8/9, assumes Y<>0
390 EQUB 13:EQUS "OS 1.21":EQUB 13:EQUB 13:EQUB 0
400 RTS:]
410 [OPT FNo(&DF39):EQUB LE895 DIV 256:EQUB LE895 AND 255:]:
420 :
430 NEXT
440 A$="SAVE JGHROM "+STR$~mem%+"+4000"
450 PRINT A$;:OSCLI A$:PRINT