agon-bbc-basic-adl
agon-bbc-basic-adl copied to clipboard
RESTORE nnn is not working
When I tried to move to bbcbasic24 due to memory issues, my program stopped at the first RESTORE nnn statement. The issue can be reproduced with the following test program
100 CLS:OSCLI("VERSION")
110 RESTORE 50000
120 READ A$
130 PRINT A$;
140 IF INSTR(A$,"50000")>1 THEN PRINT " OK" ELSE PRINT " NOK"
150 RESTORE 49000
160 READ A$
170 PRINT A$;
180 IF INSTR(A$,"49000")>1 THEN PRINT " OK" ELSE PRINT " NOK"
190 RESTORE 50000
200 PRINT "AGAIN ";A$;
210 IF INSTR(A$,"50000")>1 THEN PRINT " OK" ELSE PRINT " NOK"
220 END
48000 DATA "DATA NEVER READ AT 48000"
49000 DATA "SECOND DATA AT 49000"
50000 DATA "FIRST DATA AT 50000"
51000 DATA "DATA NEVER READ AT 51000"
LOAD "bin/bbcbasic24.bin"
RUN
LOAD "TEST.BAS"
RUN
will return the following output:
BBC BASIC (Agon ADL) Version 1.03
Type mismatch at line 110
In the 16-bit version, the RESTORE nnn statement is working, but also not always correctly, see [https://github.com/breakintoprogram/agon-bbc-basic/issues/72]