Prev: 340F Up: Map Next: 342D
341B: THE 'STACK A CONSTANT' SUBROUTINE (offset +3F)
The address of this routine is found in the table of addresses. It is called via a calculator literal (+A0 to +A4) by the routines at BEEP, FETCH_NUM, FOR, CIRCLE, DRAW, CD_PRMS1, S_RND, S_PI, DEC_TO_FP, INT_TO_FP, e_to_fp, FP_TO_BC, PRINT_FP, series, compare, int, exp, ln, get_argt, cos, sin, atn, asn, acs, sqr and to_power.
This subroutine uses SKIP_CONS to find the base address of the requested constants from the calculator's table of constants and then calls STK_CONST to make the expanded form of the constant the 'last value' on the calculator stack.
Input
A Index of the required constant (+00 to +04)
DE STKEND
Output
stk_con 341B LD H,D Set HL to hold the result pointer.
341C LD L,E
341D EXX Go to the alternate register set and save the next literal pointer.
341E PUSH HL
341F LD HL,$32C5 The base address of the calculator's table of constants.
3422 EXX Back to the main set of registers.
3423 CALL SKIP_CONS Find the requested base address.
3426 CALL STK_CONST Expand the constant.
3429 EXX Restore the next literal pointer.
342A POP HL
342B EXX
342C RET Finished.
Prev: 340F Up: Map Next: 342D