Prev: 13724 Up: Map Next: 13769
13759: THE 'STK-PNTRS' SUBROUTINE
Used by the routines at CALCULATE, strs_add, val and read_in.
This subroutine resets the HL register pair to point to the first byte of the 'last value', i.e. STKEND-5, and the DE register pair to point one past the 'last value', i.e. STKEND.
Output
DE STKEND
HL STKEND-5
STK_PNTRS 13759 LD HL,(23653) Fetch the current value of STKEND.
13762 LD DE,65531 Set DE to -5, two's complement.
13765 PUSH HL Stack the value for STKEND.
13766 ADD HL,DE Calculate STKEND-5.
13767 POP DE DE now holds STKEND and HL holds STKEND-5.
13768 RET
Prev: 13724 Up: Map Next: 13769