added test suite and fixed REMs

This commit is contained in:
Luxferre
2026-06-15 12:56:41 +03:00
parent f7e8e72b81
commit e9c44d6e9a
4 changed files with 73 additions and 2 deletions
+3 -1
View File
@@ -218,7 +218,7 @@ Value and string printing routine. Accepts `STMT` string as a parameter.
Run the program currently loaded into the working memory.
1. Set `IP = 1`.
2. If `PROGMEM[IP]` exists and is not empty, execute `PROGEXEC(PROGMEM[IP])`.
2. If `PROGMEM[IP]` exists, is not empty and does not start with the string `REM`, execute `PROGEXEC(PROGMEM[IP])`.
3. Increment `IP` by 1.
4. If `IP > 0` and `IP < 32768`, go to step 2.
@@ -279,3 +279,5 @@ Program saving routine into external storage media. The provided algorithm works
## Closing notes
The set of algorithms in this document should be enough to create a complete and functional LTTB interpreter in any modern programming language. If you have any corrections or optimizations regarding the algorithms, feel free to create an issue in this repository.
In order to verify implementation correctness, you can use the code inside [test.bas](test.bas) shipped in this repository.