]> git.sur5r.net Git - cc65/commitdiff
Added Apple II version of doesclrscrafterexit().
authorOliver Schmidt <ol.sc@web.de>
Sun, 5 Jun 2016 11:00:37 +0000 (13:00 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sun, 5 Jun 2016 11:01:42 +0000 (13:01 +0200)
The prototype and documentation is supposed to be provided together with the ATARI version.

libsrc/apple2/doesclrscr.s [new file with mode: 0644]

diff --git a/libsrc/apple2/doesclrscr.s b/libsrc/apple2/doesclrscr.s
new file mode 100644 (file)
index 0000000..2e2e7b9
--- /dev/null
@@ -0,0 +1,21 @@
+;
+; Oliver Schmidt, 2016-06-05
+;
+; unsigned char doesclrscrafterexit (void);
+;
+
+        .export         _doesclrscrafterexit
+        .import         done
+
+        .include        "apple2.inc"
+
+_doesclrscrafterexit:
+        ; If the page we jump to when done equals the page
+        ; of the warmstart vector we'll return to BASIC so
+        ; there's no implicit clrscr() after exit().
+        lda     done+2
+        sec
+        sbc     #>DOSWARM
+
+        ldx     #>$0000
+        rts