Prev: 3501 Up: Map Next: 350B
3506: THE 'LESS THAN ZERO' OPERATION (offset +36)
The address of this routine is found in the table of addresses. It is called via the calculator literal +36 by the routines at NEXT_LOOP, PRINT_FP, int, get_argt and atn.
This subroutine returns a 'last value' of one if the present 'last value' is less than zero and zero otherwise. It is also used by other subroutines to 'jump on minus'.
Input
HL Address of the first byte of the number
Output
less_0 3506 XOR A Clear the A register.
This entry point is used by the routine at greater_0 with A=+FF.
SIGN_TO_C 3507 INC HL Point to the sign byte.
3508 XOR (HL) The carry is reset for a positive number and set for a negative number; when entered from greater_0 the opposite sign goes to the carry.
3509 DEC HL
350A RLCA
This routine continues into FP_0_1.
Prev: 3501 Up: Map Next: 350B