| Routines

07181: THE 'COMMAND CLASSES - 0, 3 and 5'

The address of this routine is derived from an offset found in the command class table. The commands of class 3 may, or may not, be followed by a number. e.g. RUN and RUN 200.
Input
A | Code of the first character after the command
HL | Address of the first character after the command
CLASS_03 | 07181 | CALL FETCH_NUM | A number is fetched but zero is used in cases of default.
The address of this entry point is derived from an offset found in the command class table. The commands of class 0 must not have any operands, e.g. COPY and CONTINUE.
CLASS_00 | 07184 | CP A | Set the zero flag for later.
The address of this entry point is derived from an offset found in the command class table. The commands of class 5 may be followed by a set of items, e.g. PRINT and PRINT "222".
CLASS_05 | 07185 | POP BC | In all cases drop the address - SCAN_LOOP.
| 07186 | CALL Z,CHECK_END | If handling commands of classes 0 and 3 and syntax is being checked move on now to consider the next statement.
| 07189 | EX DE,HL | Save the line pointer in the DE register pair.
After the command class entries and the separator entries in the parameter table have been considered the jump to the appropriate command routine is made.
| 07190 | LD HL,(23668) | Fetch the pointer to the entries in the parameter table from T-ADDR and fetch the address of the required command routine.
| 07193 | LD C,(HL)
| 07194 | INC HL
| 07195 | LD B,(HL)
| 07196 | EX DE,HL | Exchange the pointers back and make an indirect jump to the command routine.
| 07197 | PUSH BC
| 07198 | RET