10REM > ShowREM
20REM J.G.Harston, 15-Feb-1990
30REM Display contents of REM in firs
t line
40REM Demonstrates writing code in BA
SIC workspace
50REM Up to 64 bytes will fit in work
space at &50-&8F
60:
70OSASCI=&FFE3
80FOR I%=0 TO 3 STEP 3
90P%=&50
100[OPT I%
110LDA #0:STA &8E
120LDA &18:STA &8F :½ &8E/F=>PAGE
130LDY #4
140.loop1
150LDA (&8E),Y:INY :½ Get byte fr
om first line
160CMP #&F4:BEQ loop2 :½ Check for R
EM token
170CMP #13:BNE loop1 :½ Loop until
end of line
180RTS :½ No REM foun
d, just exit
190.loop2
200LDA (&8E),Y:INY :½ Get byte fr
om line
210JSR OSASCI :½ Print it
220CMP #13:BNE loop2 :½ Loop until
end of line
230RTS
240]NEXT
250PRINT"*SAVE demo1 50 ";÷P%