1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +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:
cpg 2005-08-07 15:48:32 +00:00
parent 9fbc99eb6d
commit be31ff1fe4

View File

@ -16,6 +16,7 @@
.import zerobss, pushax
.import _main, __filetab, getfd
.import __LOWCODE_LOAD__, __BSS_LOAD__
.import __RESERVED_MEMORY__
.ifdef DYNAMIC_DD
.import __getdefdev
.endif
@ -68,10 +69,13 @@ L1: lda sp,x
lda APPMHI+1
sta appmsav+1
sec
lda MEMTOP
sbc #<__RESERVED_MEMORY__
sta APPMHI ; initialize our APPMHI value
ldx MEMTOP+1
stx APPMHI+1
lda MEMTOP+1
sbc #>__RESERVED_MEMORY__
sta APPMHI+1
; Call module constructors