]> git.sur5r.net Git - cc65/commitdiff
Fix doesclrscrafterexit() function on atarixl target. 311/head
authorChristian Groessler <chris@groessler.org>
Mon, 13 Jun 2016 19:16:27 +0000 (21:16 +0200)
committerChristian Groessler <chris@groessler.org>
Mon, 13 Jun 2016 19:16:27 +0000 (21:16 +0200)
On atarixl, the screen is always cleared, regardless of the running DOS.

libsrc/atari/doesclrscr.s
libsrc/atari/is_cmdline_dos.s

index c085faebf8b0057607c08a7eb35362e92f916f3d..2e19e4b988a86a75a23ad85fb71b58726407cb5f 100644 (file)
@@ -7,13 +7,14 @@
 ;
 
         .export  _doesclrscrafterexit
-        .import  __dos_type
-        .include "atari.inc"
+        .import  __is_cmdline_dos
+        .import  return1
 
+.ifdef __ATARIXL__
+_doesclrscrafterexit = return1          ; the c65 runtime always clears the screen at program termination
+.else   
 _doesclrscrafterexit:
-        ldx     #0
-        lda     __dos_type
-        cmp     #MAX_DOS_WITH_CMDLINE + 1
-        txa
-        rol     a
+        jsr     __is_cmdline_dos        ; currently (unless a DOS behaving differently is popping up)
+        eor     #$01                    ; we can get by with the inverse of __is_cmdline_dos
         rts
+.endif
index b85cb3ca7db0e5081ac98372d957f3676b5dc456..71b35fbadd91f930f399e7044ef427a56129dd2a 100644 (file)
@@ -7,9 +7,14 @@
 ;
 
         .export  __is_cmdline_dos
-        .import  _doesclrscrafterexit
+        .import  __dos_type
+        .include "atari.inc"
 
 __is_cmdline_dos:
-        jsr     _doesclrscrafterexit    ; currently (unless a DOS behaving differently is popping up)
-        eor     #$01                    ; we can get by with the inverse of _doesclrscrafterexit
+        ldx     #0
+        lda     __dos_type
+        cmp     #MAX_DOS_WITH_CMDLINE + 1
+        txa
+        rol     a
+        eor     #$01
         rts