Prev: 07103 Up: Map Next: 07150
07121: THE 'NEXT-LINE' ROUTINE
Used by the routine at LINE_RUN.
The routine at LINE_USE continues here.
On entry the HL register pair points to the location after the end of the 'next' line to be handled and the DE register pair to the location before the first character of the line. This applies to lines in the program area and also to a line in the editing area - where the next line will be the same line again whilst there are still statements to be interpreted.
Input
DE One before the address of the first character in the line
HL Start address of the following line
NEXT_LINE 07121 LD (23637),HL Set NXTLIN for use once the current line has been completed.
07124 EX DE,HL As usual CH-ADD points to the location before the first character to be considered.
07125 LD (23645),HL
07128 LD D,A The statement number is fetched.
07129 LD E,0 The E register is cleared in case EACH_STMT is used.
07131 LD (IY+10),255 Signal 'no jump' by setting NSPPC to 255.
07135 DEC D The statement number minus one goes into SUBPPC.
07136 LD (IY+13),D
07139 JP Z,STMT_LOOP A first statement can now be considered.
07142 INC D However for later statements the 'starting address' has to be found.
07143 CALL EACH_STMT
07146 JR Z,STMT_NEXT Jump forward unless the statement does not exist.
This entry point is used by the routine at LINE_NEW.
Report N - Statement lost.
REPORT_N 07148 RST 8 Call the error handling routine.
07149 DEFB 22
Prev: 07103 Up: Map Next: 07150