8-Bit Software Online Conversion

:2.S.CMOSRAM - Listing

10REM Restore/Save configurations 20REM In anticipation of flat battery 30REM (C)1996 SPROW 40IFINKEY(-256)<>253 THENPRINT:PRINT" Bad machine type":END ELSEMODE7 50PRINT"Master Series battery backup" :PRINT:PRINT"1)Save Configuration":PRINT "2)Restore configuration" 60A=GET-48:IF A>2 OR A<1 THENRUN 70*DIR :0.$ 80PRINT 90IFA=2 THENGOTO190 100REM Put bytes to disk 110PRINT"Saving as $.CMOSBAK" 120A%=161:F%=OPENOUT"$.CMOSBAK" 130FORX%=0 TO 49 140Y%=(USR(&FFF4)AND &FF0000)DIV&10000 150BPUT#F%,Y% 160NEXT 170CLOSE#F%:PRINT:PRINT"Done." 180END 190REM Restore all 200PRINT"Searching for $.CMOSBAK" 210A%=162:F%=OPENIN"$.CMOSBAK" 220FORX%=0 TO 49 230Y%=BGET#F%:CALL &FFF4 240NEXT 250CLOSE#F%:PRINT:PRINT"Done." 260END