Prev: 13327 Up: Map Next: 13357
13339: THE 'STACK A CONSTANT' SUBROUTINE (offset 63)
The address of this routine is found in the table of addresses. It is called via a calculator literal (160 to 164) 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 (0 to 4)
DE STKEND
stk_con 13339 LD H,D Set HL to hold the result pointer.
13340 LD L,E
13341 EXX Go to the alternate register set and save the next literal pointer.
13342 PUSH HL
13343 LD HL,12997 The base address of the calculator's table of constants.
13346 EXX Back to the main set of registers.
13347 CALL SKIP_CONS Find the requested base address.
13350 CALL STK_CONST Expand the constant.
13353 EXX Restore the next literal pointer.
13354 POP HL
13355 EXX
13356 RET Finished.
Prev: 13327 Up: Map Next: 13357