From: cpg Date: Sun, 7 Aug 2005 15:48:32 +0000 (+0000) Subject: take __RESERVED_MEMORY__ from linker script into account when setting X-Git-Tag: V2.12.0~275 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be31ff1fe4775ea43b3fe0a444e695ef7379f699;p=cc65 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 --- diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index 83b493341..f930f470c 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -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