Shortened names and adjusted style.

This commit is contained in:
Oliver Schmidt
2020-04-02 22:58:16 +02:00
parent 411fe87f64
commit 0981c020b2
27 changed files with 92 additions and 99 deletions

View File

@@ -12,17 +12,17 @@
.export _toupper
.include "ctype.inc"
.import ctype_preprocessor_no_check
.import ctypemaskdirect
_toupper:
cpx #$00 ; out of range?
bne @L2 ; if so, return the argument unchanged
tay ; save char
jsr ctype_preprocessor_no_check
jsr ctypemaskdirect ; get character classification
and #CT_LOWER ; lower case char?
beq @L1 ; jump if no
tya ; restore char
adc #<('A'-'a') ; make upper case char (ctype_preprocessor_no_check ensures carry clear)
adc #<('A'-'a') ; make upper case char (ctypemaskdirect ensures carry clear)
rts
@L1: tya ; restore char
@L2: rts