fix CHROUT handling of most character codes
This commit is contained in:
1 parent
8ffe1b61da
commit
b5ab7ba10c
1 file changed
+18
-21
+18
-21
@@ -279,33 +279,30 @@ not_clearscreen:
|
|||||||
jmp chrout_done
|
jmp chrout_done
|
||||||
*
|
*
|
||||||
|
|
||||||
;; Unshifted letters
|
;; Range $20-$3F is unchanged
|
||||||
cmp #$40
|
cmp #$40
|
||||||
bcc not_lower
|
bcc not_high_char
|
||||||
cmp #$41+26
|
|
||||||
bcs not_lower
|
|
||||||
and #$1f
|
|
||||||
jmp chrout_l1
|
|
||||||
|
|
||||||
not_lower:
|
;; Unshifted letters and symbols from $40-$5F
|
||||||
|
;; all end up being -$40
|
||||||
|
;; (C64 PRG p376)
|
||||||
|
|
||||||
;; Shifted letters
|
;; But anything >= $80 needs to be -$40
|
||||||
cmp #$60
|
;; (C64 PRG p380-381)
|
||||||
bcc not_upper
|
;; And bit 7 should be cleared, only to be
|
||||||
cmp #$60+26
|
;; set by reverse video
|
||||||
bcs not_upper
|
|
||||||
sec
|
|
||||||
sbc #$20
|
|
||||||
|
|
||||||
jmp chrout_l1
|
|
||||||
|
|
||||||
not_upper:
|
|
||||||
cmp #$a0
|
|
||||||
bcc not_vendor
|
|
||||||
sec
|
sec
|
||||||
sbc #$40
|
sbc #$40
|
||||||
|
|
||||||
not_vendor:
|
;; Fix shifted chars by adding $20 again
|
||||||
|
cmp #$20
|
||||||
|
bcc not_high_char
|
||||||
|
cmp #$40
|
||||||
|
bcs not_high_char
|
||||||
|
clc
|
||||||
|
adc #$20
|
||||||
|
|
||||||
|
not_high_char:
|
||||||
|
|
||||||
chrout_l1:
|
chrout_l1:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user