From: Christian Groessler Date: Mon, 13 Jun 2016 19:16:27 +0000 (+0200) Subject: Fix doesclrscrafterexit() function on atarixl target. X-Git-Tag: V2.16~105^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4aa9a414c661a1e179500b02cf4f27dabf5b9272;p=cc65 Fix doesclrscrafterexit() function on atarixl target. On atarixl, the screen is always cleared, regardless of the running DOS. --- diff --git a/libsrc/atari/doesclrscr.s b/libsrc/atari/doesclrscr.s index c085faebf..2e19e4b98 100644 --- a/libsrc/atari/doesclrscr.s +++ b/libsrc/atari/doesclrscr.s @@ -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 diff --git a/libsrc/atari/is_cmdline_dos.s b/libsrc/atari/is_cmdline_dos.s index b85cb3ca7..71b35fbad 100644 --- a/libsrc/atari/is_cmdline_dos.s +++ b/libsrc/atari/is_cmdline_dos.s @@ -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