Prev: 1538 Up: Map Next: 15A2
1582: execute_basic_stop: Setup VARS, and E-LINE and prepare to execute STOP.
Used by the routine at parse_download.
This routine replaces code from the OEL Issue 2.3 ROM.
execute_basic_stop 1582 LD HL,$5CCB Set HL to $5CCB.
1585 LD DE,(prog_length) Add prog_length.
1589 ADD HL,DE
158A LD ($5C4B),HL Store result in VARS.
158D LD DE,(vars_length) Add vars_length.
1591 ADD HL,DE
1592 LD ($5C59),HL Store result in E-LINE.
1595 LD (HL),$E2 Store $E2 (BASIC STOP token) at address in HL.
1597 INC HL
1598 LD (HL),$0D Store $0D (BASIC newline) at next address.
159A INC HL
159B LD (HL),$80 Store $80 (BASIC terminator) at next address.
159D INC HL
159E LD ($5C61),HL Store next address in WORKSP and return.
15A1 RET
Prev: 1538 Up: Map Next: 15A2