From d20d99b32bfe6a458f307ceb32429398ffa6c074 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Mon, 13 Apr 2026 08:43:15 +0200 Subject: [PATCH] Fix reverse lowercase on Apple][ Fixes #2831. Thanks to Alex Volkov for the patch --- libsrc/apple2/cputc.s | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libsrc/apple2/cputc.s b/libsrc/apple2/cputc.s index dc851e11b..436ea3b53 100644 --- a/libsrc/apple2/cputc.s +++ b/libsrc/apple2/cputc.s @@ -109,16 +109,14 @@ newline: : jmp VTABZ putchar: - .ifdef __APPLE2ENH__ - ldy INVFLG - cpy #$FF ; Normal character display mode? - beq putchardirect cmp #$E0 ; Lowercase? - bcc mask - and #$7F ; Inverse lowercase - bra putchardirect + and INVFLG ; Apply normal, inverse, flash + bcc putchardirect ; Not lowercase, no special handling + .ifndef __APPLE2ENH__ + bit machinetype + bpl putchardirect ; Mask normally for ][/+ ; done .endif -mask: and INVFLG ; Apply normal, inverse, flash + ora #$40 ; Restore lowercase bit for //e and up putchardirect: tax