mirror of
https://github.com/cc65/cc65.git
synced 2025-02-27 14:29:52 +00:00
take __RESERVED_MEMORY__ from linker script into account when setting
upper memory limit git-svn-id: svn://svn.cc65.org/cc65/trunk@3569 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
9fbc99eb6d
commit
be31ff1fe4
@ -16,6 +16,7 @@
|
|||||||
.import zerobss, pushax
|
.import zerobss, pushax
|
||||||
.import _main, __filetab, getfd
|
.import _main, __filetab, getfd
|
||||||
.import __LOWCODE_LOAD__, __BSS_LOAD__
|
.import __LOWCODE_LOAD__, __BSS_LOAD__
|
||||||
|
.import __RESERVED_MEMORY__
|
||||||
.ifdef DYNAMIC_DD
|
.ifdef DYNAMIC_DD
|
||||||
.import __getdefdev
|
.import __getdefdev
|
||||||
.endif
|
.endif
|
||||||
@ -68,10 +69,13 @@ L1: lda sp,x
|
|||||||
lda APPMHI+1
|
lda APPMHI+1
|
||||||
sta appmsav+1
|
sta appmsav+1
|
||||||
|
|
||||||
|
sec
|
||||||
lda MEMTOP
|
lda MEMTOP
|
||||||
|
sbc #<__RESERVED_MEMORY__
|
||||||
sta APPMHI ; initialize our APPMHI value
|
sta APPMHI ; initialize our APPMHI value
|
||||||
ldx MEMTOP+1
|
lda MEMTOP+1
|
||||||
stx APPMHI+1
|
sbc #>__RESERVED_MEMORY__
|
||||||
|
sta APPMHI+1
|
||||||
|
|
||||||
; Call module constructors
|
; Call module constructors
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user