Bugs solved?
It seems ASIC was not to blame for the bug with conditions when compiling with ASIC. Blame it on me.
Somehow, I forgot that BAS2ASI (converter from gw-basic to ASIC) does not allow multiple instructions after THEN. I was aware of it when using ELSE (a syntax error is thrown when multiple instructions are found between THEN and ELSE) but the error with multiple instructions after ELSE (of after a THEN without ELSE) is more subtile:
IF 1=0 THEN PRINT "ERROR" : RETURN
Is rendered to:
IF 1=0 THEN PRINT "ERROR" ENDIF RETURN
So there were many, many instructions that were never reached because a RETURN was triggered.
I have solved also the issue with the keys. ASIC uses a variable called EXTENDED to mark the keys as extended, while GW-BASIC, QBASIC and even VBA append CHR$(0) before the extended keycode.
I already had two variables to make tests, I$ that was loaded with standard key (or chr$(0)), and II$ that was loaded with extended keycode. So I simply changed a test for LEN(I$) into a test for EXTENDED, and emptied I$ in case extended was 1.
Files
Get Hexagono (dos COM console game)
Hexagono (dos COM console game)
A simple game to close hexagons
Status | Released |
Author | José G. Moya Y. |
More posts
- Strange ASIC bug61 days ago
- V 1.1 update62 days ago
Leave a comment
Log in with itch.io to leave a comment.