Prev: 169E Up: Map Next: 16D4
16B0: THE 'SET-MIN' SUBROUTINE
Used by the routine at MAIN_EXEC.
This subroutine resets the editing area and the areas after it to their minimum sizes. In effect it 'clears' the areas.
SET_MIN 16B0 LD HL,($5C59) Fetch E-LINE.
16B3 LD (HL),$0D Make the editing area hold only the 'carriage return' character and the end marker, and set K-CUR accordingly
16B5 LD ($5C5B),HL
16B8 INC HL
16B9 LD (HL),$80
16BB INC HL Reset WORKSP and move on to clear the work space.
16BC LD ($5C61),HL
This entry point is used by the routines at STMT_LOOP and INPUT.
Entering here will 'clear' the work space and the calculator stack.
SET_WORK 16BF LD HL,($5C61) Fetch the start address of the work space WORKSP.
16C2 LD ($5C63),HL Clear the work space by setting STKBOT equal to WORKSP.
This entry point is used by the routines at ERROR_2 and E_LINE_NO.
Entering here will 'clear' only the calculator stack.
SET_STK 16C5 LD HL,($5C63) Fetch STKBOT.
16C8 LD ($5C65),HL Clear the stack by setting STKEND equal to STKBOT.
In all cases make MEM address the calculator's memory area.
16CB PUSH HL Save STKEND.
16CC LD HL,$5C92 The base of the memory area (MEMBOT).
16CF LD ($5C68),HL Set MEM to this address.
16D2 POP HL Restore STKEND to the HL register pair before returning.
16D3 RET
Prev: 169E Up: Map Next: 16D4