In the meantime I managed to the the code for my TINY BASIC interpreter for the CRAY-1 supercomputer working! I was stuck on the FOR/NEXT loop (in particularly the NEXT statement). But I have managed to resolve it between looking at your posts.
The original TINY BASIC worked with 16-bit signed integers, so was in the range -32768 to +32767. The CRAY-1 has 64-bit registers, so my TINY BASIC numbers are not so tiny anymore!
I have a few error checks missing from Li-Chen Wang's original code - but I will get around to adding them in at some point.
My next task is to implement the LOAD command and get Star Trek running
!!!
Dave