02-18-2011, 09:40 PM
You're overflowing your screen: SINCLAIR Basic PRINT AT uses Y, X coordinates (row, column)
I've reversed them in your listing and it seems to be working ok. Since this is a compiled program, by default it won't check your screen overflows (e.g. "OUT of Screen error"), but with the flag (NOT YET IMPLEMENTED) --debug-screen it will stop when this happens.
There are more checkers already done:
--debug-array Will raise a "Subscript out of range" if you access an non-existing array-cell
--debug-memory Will raise an "Out of memory error" in case the program run out of mem.
The idea is: If you suspect your program has an error, enable the checkers and tests it. Once your program runs ok, compile again without your check flags (faster and less memory required)
Tip: PRINT ... ; is faster than PRINT ... , because the former doesn't need to print a newline. So use PRINT ... ; whenever possible. Also for legibility, you can use PRINT "\A" instead of PRINT CHRS$(144) (the compiled code is the same, though);

I've reversed them in your listing and it seems to be working ok. Since this is a compiled program, by default it won't check your screen overflows (e.g. "OUT of Screen error"), but with the flag (NOT YET IMPLEMENTED) --debug-screen it will stop when this happens.
There are more checkers already done:
--debug-array Will raise a "Subscript out of range" if you access an non-existing array-cell
--debug-memory Will raise an "Out of memory error" in case the program run out of mem.
The idea is: If you suspect your program has an error, enable the checkers and tests it. Once your program runs ok, compile again without your check flags (faster and less memory required)
