| Routines

1C79: THE 'EXPECT NUMERIC/STRING EXPRESSIONS' SUBROUTINE

Used by the routines at PR_ITEM_1 and S_2_COORD. There is a series of short subroutines that are used to fetch the result of evaluating the next expression. The result from a single expression is returned as a 'last value' on the calculator stack.
This entry point is used when CH-ADD needs updating to point to the start of the first expression.
NEXT_2NUM | 1C79 | RST $20 | Advance CH-ADD.
This entry point is used by the routine at CLASS_09. The address of this entry point is derived from an offset found in the command class table. This entry point allows for two numeric expressions, separated by a comma, to be evaluated.
CLASS_08 | 1C7A | CALL CLASS_06 | Evaluate each expression in turn - so evaluate the first.
| 1C7D | CP "," | Give an error report if the separator is not a comma.
| 1C7F | JR NZ,REPORT_C
| 1C81 | RST $20 | Advance CH-ADD.
This entry point is used by the routines at SAVE_ETC, LIST, FETCH_NUM, FOR, PR_ITEM_1, STR_ALTER, CO_TEMP_1, CIRCLE, DRAW and INT_EXP1. The address of this entry point is derived from an offset found in the command class table. This entry point allows for a single numeric expression to be evaluated.
CLASS_06 | 1C82 | CALL SCANNING | Evaluate the next expression.
| 1C85 | BIT 6,(IY+$01) | Return as long as the result was numeric (bit 6 of FLAGS set); otherwise it is an error.
| 1C89 | RET NZ
This entry point is used by the routines at PROGNAME, SAVE_ETC, E_LINE_NO, STMT_LOOP, SEPARATOR, STMT_NEXT, VAL_FET_1, CLASS_04, DEF_FN, INPUT, CO_TEMP_1, CIRCLE, S_QUOTE_S, S_2_COORD, S_BRACKET, S_LETTER, S_FN_SBRN, LOOK_VARS, SLICING, DIM, DEC_TO_FP and val. Report C - Nonsense in BASIC.
REPORT_C | 1C8A | RST $08 | Call the error handling routine.
| 1C8B | DEFB $0B
This entry point is used by the routine at SAVE_ETC. The address of this entry point is derived from an offset found in the command class table. This entry point allows for a single string expression to be evaluated.
CLASS_0A | 1C8C | CALL SCANNING | Evaluate the next expression.
| 1C8F | BIT 6,(IY+$01) | This time return if the result indicates a string (bit 6 of FLAGS reset); otherwise give an error report.
| 1C93 | RET Z
| 1C94 | JR REPORT_C