ctype size optimization

This commit is contained in:
IrgendwerA8
2020-01-02 18:57:03 +01:00
committed by Oliver Schmidt
parent dc5114b071
commit ce80624f62
43 changed files with 1491 additions and 3563 deletions

View File

@@ -10,9 +10,8 @@
.export _strupper, _strupr
.import popax
.import __ctype
.importzp ptr1, ptr2
.import ctype_preprocessor_no_check
.include "ctype.inc"
_strupper:
@@ -25,11 +24,10 @@ _strupr:
loop: lda (ptr1),y ; get character
beq L9 ; jump if done
tax
lda __ctype,x ; get character classification
jsr ctype_preprocessor_no_check
and #CT_LOWER ; lower case char?
beq L1 ; jump if no
txa ; get character back into accu
lda (ptr1),y ; fetch character again
clc
adc #<('A'-'a') ; make upper case char
sta (ptr1),y ; store back