CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
- ZPSAVE: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
- ZPSAVE: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
.import initlib, donelib
.import callmain, zerobss
- .import __STARTUP_LOAD__, __ZPSAVE_LOAD__
+ .import __STARTUP_LOAD__, __BSS_LOAD__
.import __RESERVED_MEMORY__
.include "zeropage.inc"
.word $FFFF
.word __STARTUP_LOAD__
- .word __ZPSAVE_LOAD__ - 1
+ .word __BSS_LOAD__ - 1
; ------------------------------------------------------------------------
; Actual code
; Real entry point:
-; Save the zero page locations we need
-
- ldx #zpspace-1
-L1: lda sp,x
- sta zpsave,x
- dex
- bpl L1
-
; Clear the BSS data
jsr zerobss
lda appmsav+1
sta APPMHI+1
-; Copy back the zero page stuff
-
- ldx #zpspace-1
-L2: lda zpsave,x
- sta sp,x
- dex
- bpl L2
-
; Turn on cursor
- inx
+ ldx #0
stx CRSINH
; Back to DOS
; ------------------------------------------------------------------------
-.segment "ZPSAVE"
-
-zpsave: .res zpspace
-
-; ------------------------------------------------------------------------
-
.bss
spsave: .res 1
old_shflok: .res 1
old_lmargin: .res 1
- .segment "AUTOSTRT"
- .word RUNAD ; defined in atari.h
+
+.segment "AUTOSTRT"
+ .word RUNAD ; defined in atari.inc
.word RUNAD+1
.word __STARTUP_LOAD__ + 1