The first 4K of the 6KB OnliBasic image is a pretty close match to the version of SystemBasic here:
http://www.theoddys.com/acorn/Acorn%20S ... basic.html
There are just two differences, neither of which is specific to the OnliBasic extension
A 1-bye change at #CC13
This affects the error number returned when a GOTO/GOSUB line number is not found
The OnliBasic version returns 31, the SystemBasic version returns 127.
Atom Basic matches the SystemBasic version.
A 13 byte difference #CE57-#CE66
This is the code that makes space for a new line to be inserted into a program.
Here the OnliBasic, AtomBasic and SystemBasic versions are all slightly different:
CE4B is the inner loop that block moves the program up in memory to make space for the line just inserted.
Code: Select all
#52/3 = new value of TOP
#54/5 = old value of TOP
#56/7 = the line input buffer at #0100
#58/9 = the address where the new line should be inserted
The loop works backwards, copying (#54),Y to (#52),Y until #54/5 + Y matches #58/9.
I don't see bugs in any of the versions.
The Onli and Atom versions are the most similar: only the position of an SEC moves. That seems a cosmetic change to make it clearer that C=1 before the JSR $CEA2. The System version looks slightly more efficient - it saves 4 cycles on average per program byte moved.
Based on this, I would say the Onli version is the oldest, then the Atom version, and the System version is the newest,
to be continued...