]> git.sur5r.net Git - cc65/commitdiff
"save area" is used to save modified system variables and ports. It's
authorChristian Groessler <chris@groessler.org>
Thu, 30 May 2013 00:31:25 +0000 (02:31 +0200)
committerChristian Groessler <chris@groessler.org>
Thu, 30 May 2013 00:31:25 +0000 (02:31 +0200)
shared between the second and main chunk.

libsrc/atari/save_area.inc [new file with mode: 0644]
libsrc/atari/save_area.s [new file with mode: 0644]

diff --git a/libsrc/atari/save_area.inc b/libsrc/atari/save_area.inc
new file mode 100644 (file)
index 0000000..10ee4af
--- /dev/null
@@ -0,0 +1,6 @@
+
+.import SAVMSC_save
+.import MEMTOP_save
+.import APPMHI_save
+.import RAMTOP_save
+.import PORTB_save
\ No newline at end of file
diff --git a/libsrc/atari/save_area.s b/libsrc/atari/save_area.s
new file mode 100644 (file)
index 0000000..0467b67
--- /dev/null
@@ -0,0 +1,25 @@
+;
+; Atari XL, shared data between 2nd load chunk and main chunk
+;
+; Contains old values of modified system variables and ports.
+;
+; Christian Groessler, chris@groessler.org, 2013
+;
+
+.if .defined(__ATARIXL__)
+
+.export                SAVMSC_save
+.export                MEMTOP_save
+.export                APPMHI_save
+.export                RAMTOP_save
+.export                PORTB_save
+
+.segment        "SAVEAREA"
+
+SAVMSC_save:   .res    2
+MEMTOP_save:   .res    2
+APPMHI_save:   .res    2
+RAMTOP_save:   .res    1
+PORTB_save:    .res    1
+
+.endif