Moved the data that keeps a copy of the used zero page locations in its own
segment to reduce the executable size. git-svn-id: svn://svn.cc65.org/cc65/trunk@3849 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -174,7 +174,7 @@ initsp:
|
|||||||
sta sp+1
|
sta sp+1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.data
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
zpsave: .res zpspace
|
zpsave: .res zpspace
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
.byte $00 ; $2AF
|
.byte $00 ; $2AF
|
||||||
.byte $80 ; $2AE Machine code flag
|
.byte $80 ; $2AE Machine code flag
|
||||||
.byte $C7 ; $2AD Autoload flag
|
.byte $C7 ; $2AD Autoload flag
|
||||||
.dbyt __BSS_LOAD__ ; $2AB
|
.dbyt __BSS_LOAD__ ; $2AB
|
||||||
.dbyt __RAM_START__ ; $2A9
|
.dbyt __RAM_START__ ; $2A9
|
||||||
.byte $00 ; $2A8
|
.byte $00 ; $2A8
|
||||||
.byte $00 ; Zero terminated name
|
.byte $00 ; Zero terminated name
|
||||||
@@ -100,7 +100,7 @@ L2: lda zpsave,x
|
|||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data
|
; Data
|
||||||
|
|
||||||
.data
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
zpsave: .res zpspace
|
zpsave: .res zpspace
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,8 @@ IRQStub:
|
|||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data
|
; Data
|
||||||
|
|
||||||
.data
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
zpsave: .res zpspace
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|||||||
@@ -102,10 +102,12 @@ L2: lda zpsave,x
|
|||||||
jmp RESTOR
|
jmp RESTOR
|
||||||
|
|
||||||
|
|
||||||
.data
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
zpsave: .res zpspace
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
spsave: .res 1
|
spsave: .res 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -150,9 +150,12 @@ IRQStub:
|
|||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
zpsave: .res zpspace
|
|
||||||
IRQInd: jmp $0000
|
IRQInd: jmp $0000
|
||||||
|
|
||||||
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
spsave: .res 1
|
spsave: .res 1
|
||||||
|
|||||||
@@ -136,9 +136,12 @@ IRQStub:
|
|||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
zpsave: .res zpspace
|
|
||||||
IRQInd: jmp $0000
|
IRQInd: jmp $0000
|
||||||
|
|
||||||
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
spsave: .res 1
|
spsave: .res 1
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ IRQ: cld ; Just to be sure
|
|||||||
bne dobreak
|
bne dobreak
|
||||||
|
|
||||||
; It's an IRQ and RAM is enabled. If we have handlers, call them. We will use
|
; It's an IRQ and RAM is enabled. If we have handlers, call them. We will use
|
||||||
; a flag here instead of loading __INTERRUPTOR_COUNT__ directly, since the
|
; a flag here instead of loading __INTERRUPTOR_COUNT__ directly, since the
|
||||||
; condes function is not reentrant. The irqcount flag will be set/reset from
|
; condes function is not reentrant. The irqcount flag will be set/reset from
|
||||||
; the main code, to avoid races.
|
; the main code, to avoid races.
|
||||||
|
|
||||||
ldy irqcount
|
ldy irqcount
|
||||||
@@ -194,13 +194,16 @@ nohandler:
|
|||||||
; Data
|
; Data
|
||||||
|
|
||||||
.data
|
.data
|
||||||
zpsave: .res zpspace
|
|
||||||
|
|
||||||
; BRK handling
|
; BRK handling
|
||||||
brk_jmp: jmp $0000
|
brk_jmp: jmp $0000
|
||||||
|
|
||||||
spsave: .res 1
|
spsave: .res 1
|
||||||
|
|
||||||
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
irqcount: .byte 0
|
irqcount: .byte 0
|
||||||
|
|
||||||
|
|||||||
@@ -142,9 +142,12 @@ IRQStub:
|
|||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
zpsave: .res zpspace
|
|
||||||
IRQInd: jmp $0000
|
IRQInd: jmp $0000
|
||||||
|
|
||||||
|
.segment "ZPSAVE"
|
||||||
|
|
||||||
|
zpsave: .res zpspace
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
|
||||||
spsave: .res 1
|
spsave: .res 1
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro, define = yes;
|
CODE: load = RAM, type = ro, define = yes;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ SEGMENTS {
|
|||||||
CODE: load = RAM, type = ro;
|
CODE: load = RAM, type = ro;
|
||||||
RODATA: load = RAM, type = ro;
|
RODATA: load = RAM, type = ro;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
ZPSAVE: load = RAM, type = bss;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
|
|||||||
Reference in New Issue
Block a user