From 8bc4b4c636c878f02d71a2875840cc340e87a285 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Wed, 11 Sep 2013 22:43:35 +0200 Subject: [PATCH] add code to add free shadow memory to heap (currently disabled) --- cfg/atarixl.cfg | 2 +- libsrc/atari/crt0.s | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cfg/atarixl.cfg b/cfg/atarixl.cfg index 1968ecd8e..493381779 100644 --- a/cfg/atarixl.cfg +++ b/cfg/atarixl.cfg @@ -41,7 +41,7 @@ MEMORY { CHARGEN: file = "", define = yes, start = $D800, size = $0400; # memory beneath the ROM - RAM_BELOW_ROM: file = "", start = $DC00, size = $FFF0 - $DC00; + RAM_BELOW_ROM: file = "", define = yes, start = $DC00, size = $FFF0 - $DC00; } SEGMENTS { diff --git a/libsrc/atari/crt0.s b/libsrc/atari/crt0.s index db8a595e3..eb5de1f40 100644 --- a/libsrc/atari/crt0.s +++ b/libsrc/atari/crt0.s @@ -97,6 +97,23 @@ jsr initlib +.if 0 +.if .defined(__ATARIXL__) + .import __heapadd + .import pushax + .import __RAM_BELOW_ROM_START__ + .import __RAM_BELOW_ROM_SIZE__ + .import __RAM_BELOW_ROM_LAST__ + + lda #<__RAM_BELOW_ROM_LAST__ + ldx #>__RAM_BELOW_ROM_LAST__ + jsr pushax + lda #<(__RAM_BELOW_ROM_SIZE__ - (__RAM_BELOW_ROM_LAST__ - __RAM_BELOW_ROM_START__)) + ldx #>(__RAM_BELOW_ROM_SIZE__ - (__RAM_BELOW_ROM_LAST__ - __RAM_BELOW_ROM_START__)) + jsr __heapadd +.endif +.endif + ; Set left margin to 0 lda LMARGN -- 2.39.5