Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Artist
A *very* short extract from the Assembler code :
STATE3: DW ALPH, NUM, DOLLAR, PARENS, BRACKETS, BRACES, OPERATORS
Basically, this state-machine-driven parser is *much* more playful than the old stack one (or even recursive descent). There are currently four windows (Sheila, SYSTAT, Segs, and Keyboard). It subclasses INT $09, trnslates scan codes to ASCII, then looks up the ASCII in a CHARTAB to get a Character Class (lol, not a RPG one) and Flag byte, then uses the Class and current State to pick a vector from the state table (see example above), does a CALL [BX] to call its action routine and update the screen window, and jump to a new State. Very easy and quick in ASM. It doesn't even need to fork (i.e. queue a lower priority procedure) to avoid eating up interrupt time. Eventually it will pipe the resultant parse trees into a Buf, which will be executed by ::ILA:: (the runtime interpreter). Oh, I also need to add a "BAD" state, so it can trap syntax errors in the keyboard driver and bleep, to catch trash like "X <:: 123abcQWERTYbleh"lol";