From 44257b9b4a04e0764087574c8100815775613821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChlstrasser?= Date: Wed, 18 May 2022 18:57:52 +0200 Subject: [PATCH] Fix switched meaning of '\n' and '\r' When conio was implemented for the osic1p target, the cbm target was used as a blueprint. But it was overlooked that the cbm target encodes CR as 0x0A and LF as 0x0D, while the osic1p target uses the ASCII encoding of CR and LF. Therefore conio output of '\n' moved the active position to the start of the line and '\r' moved the active position to the next line. This change implements the correct semantics of '\n' and '\r' in conio for the osic1p target. Fixes #1747. --- libsrc/osic1p/osiscreen.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsrc/osic1p/osiscreen.inc b/libsrc/osic1p/osiscreen.inc index ee2e52174..509b4cf79 100644 --- a/libsrc/osic1p/osiscreen.inc +++ b/libsrc/osic1p/osiscreen.inc @@ -78,13 +78,13 @@ _cputcxy: ; Plot a character - also used as internal function -_cputc: cmp #$0A ; CR? +_cputc: cmp #$0D ; CR? bne L1 lda #0 sta CURS_X beq plot ; Recalculate pointers -L1: cmp #$0D ; LF? +L1: cmp #$0A ; LF? beq newline ; Recalculate pointers cputdirect: