Thursday, August 05, 2010

GFA update

When GFA was written the bios only had devices 0 to 5, thus it does not work correctly with bios devices 6 and up when the TT030 appeared with extra serial ports. I'm not going to go into details why it fails, suffice it to say its messy, and OUT generates strange error messages if these device numbers are used.

I've now corrected this situation so devices 6 and up are now working. Rewritten commands:
INP(), INP&(), and INP%() (byte, word, long input respectively)
OUT, OUT&, and OUT% (byte, word, long output respectively)

By some stroke of luck INP?() and OUT?() (inquire device status) happen to work fine, but I added some error checking in the runonly interpreter that should have been there.

These changes will require a new compiler and library and runonly interpreter.

OPEN does not support the extra devices. In order to fix OPEN a complete rewrite of the entire I/O sub-system in GFA would be required. Not something I really want to do. The 8 device commands above should be enough to write code for the new devices.

GFA update

Some more interpreter issues resolved. I just discovered virtually every command that has a procedure name as a parameter does not bother to check if the procedure exists at all. No error message or anything. Example:

ON ERROR GOSUB blah

This will run with no error message. Also if the procedure 'blah' does exist it cannot have a parameter list. The interpreter will ignore this also:

ON ERROR GOSUB blah
PROCEDURE blah(param&)
RETURN

It ends up just ignoring the commands completely and the built in error handler is called. This happens with EVERY/AFTER, TRON proc, ON BREAK GOSUB, and all the ON MENU GOSUB xxx commands as well. I've done some work on this so the updated runonly catches all these even where the procedure should not have parameters. It will now report 'too many parameters' in such a case.