Prev: 33C6 Up: Map Next: 3406
33F7: THE 'SKIP CONSTANTS' SUBROUTINE
Used by the routine at stk_con.
This subroutine is entered with the HL' register pair holding the base address of the calculator's table of constants and the A register holding a parameter that shows which of the five constants is being requested.
The subroutine performs the null operations of loading the five bytes of each unwanted constant into the locations 0000, 0001, 0002, 0003 and 0004 at the beginning of the ROM until the requested constant is reached.
The subroutine returns with the HL' register pair holding the base address of the requested constant within the table of constants.
Input
A Index of the required constant (+00 to +04)
HL' CONSTANTS
Output
HL' Address of the required constant
SKIP_CONS 33F7 AND A The subroutine returns if the parameter is zero, or when the requested constant has been reached.
SKIP_NEXT 33F8 RET Z
33F9 PUSH AF Save the parameter.
33FA PUSH DE Save the result pointer.
33FB LD DE,$0000 The dummy address.
33FE CALL STK_CONST Perform imaginary stacking of an expanded constant.
3401 POP DE Restore the result pointer.
3402 POP AF Restore the parameter.
3403 DEC A Count the loops.
3404 JR SKIP_NEXT Jump back to consider the value of the counter.
Prev: 33C6 Up: Map Next: 3406