From 4aa9a414c661a1e179500b02cf4f27dabf5b9272 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Mon, 13 Jun 2016 21:16:27 +0200 Subject: [PATCH] Fix doesclrscrafterexit() function on atarixl target. On atarixl, the screen is always cleared, regardless of the running DOS. --- libsrc/atari/doesclrscr.s | 15 ++++++++------- libsrc/atari/is_cmdline_dos.s | 11 ++++++++--- 2 files changed, 16 insertions(+), 10 deletions(-) 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 -- 2.39.5