8-Bit Software Online Conversion

:2.S.HiDemo - Listing

10REM > HiDemo 20REM Demostates running above Basic on 6502Tube 30: 40HIMEM=FNhimem0 50ONERRORIFFNerr:PROCend 60PRINT"Program is at &";~PAGE 70PRINT"Data space is at &";~LOMEM;" to &";~HIMEM 80PRINT"Available memory &";~HIMEM-LO MEM;" (";HIMEM-LOMEM;" bytes)" 90REPEATUNTILFNmenu:PROCend:END 100: 110DEFPROCend:HIMEM=FNhimem1:END 120: 130DEFFNerr:REPORT:PRINT:=INKEY-1 140: 150DEFFNhimem0:A%=130:IF((USR&FFF4)AND &FFFF00)=&FFFF00:=HIMEM 160IF?&FFF7<>&6C OR HIMEM=&B800:=HIMEM 170IFPAGE=&C000:LOMEM=&800:=&8000 180PAGE=&C000:HIMEM=&F800:CHAIN$&600 190DEFFNhimem1:IFHIMEM<PAGE:=&F800 ELS E =HIMEM 200DEFFNhimem2:IFHIMEM<PAGE:PAGE=&800: =HIMEM ELSE =HIMEM 210: 220DEFFNmenu 230PRINT"M: Return to 8BS Menu" 240PRINT"H: Chain a program in high me mory" 250PRINT"C: Chain a program in low mem ory" 260PRINT"Q: Quit" 270: 280REPEAT 290A$=GET$:IFA$="*":REPEATINPUTLINE"*" A$:OSCLIA$:UNTILA$="":PRINT":";:A$="*" 300A$=CHR$(ASCA$AND(&DF OR(A$<"£"))):U NTILINSTR("MHCQ",A$) 310: 320IFA$="M":HIMEM=FNhimem2:CHAIN"$.!Bo ot" 330IFA$="C":PRINT"Loads program over d ata space":INPUT"Filename: "F$:HIMEM=FNh imem2:CHAINF$ 340IFA$="H":PRINT"Loads program over t his program":INPUT"Filename: "F$:HIMEM=F Nhimem1:CHAINF$ 350: 360=A$="Q"