Having exec'd one statement, this block moves on to the next statement in the line or the next line if there are no more statements on the current line.
|Give user a chance to break the execution.|
|If we have a ':' then that's a statement seperator (which allows multiple statements on the same line) so we jump to Exec to run it.|
|Well it wasn't a statement seperator, therefore it must be the null byte terminating the line otherwise it's a syntax error.|
|The next two bytes should be the address of the next line. We can ignore this, since lines are stored consecutively, but must jump back to Main if we've reached the end of the program|
|Get the number of the following program line, store it in CURRENT_LINE and fall into Exec to run it.|
Executes a statement of BASIC code pointed to by HL.
|Get first character of statement.|
|Stick address of ExecNext onto stack so we can return to it.|
|Return immediately if this is an empty statement.|
|See if we lead with a keyword, ie first byte is >=0x80. If it isn't then it might be an implicit LET statement (ie where the LET has not been typed) and so we defer to the LET handler to deal with it.|
|If it's not a general keyword then that's a syntax error.|
|Ok so we have a general keyword, so here we get the address of the handling function into HL, preserving the program ptr in DE.|
|044E||07||RLC||BC = A*2|
|Read the keyword handler function address into BC.|
|Stick keyword handler function address on stack, restore program ptr to HL, get the next character of the statement, and return to the keyword handler function.|