Squeezed a few cycles/bytes out of tolower and toupper.

git-svn-id: svn://svn.cc65.org/cc65/trunk@690 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-04-19 06:46:01 +00:00
parent 72e27092d4
commit dccc89edae
2 changed files with 8 additions and 14 deletions

View File

@@ -10,13 +10,10 @@
_toupper:
tay ; Get c into Y
lda __ctype,y ; Get character classification
and #$01 ; Mask lower char bit
beq L1 ; Jump if not lower char
lsr a ; Get bit 0 (lower char) into carry
tya ; Get C back into A
bcc L9 ; Jump if not lower char
clc
adc __cdiff ; make upper case char
rts ; CC are set
L1: tya ; Get C back
rts ; CC are set
L9: rts ; CC are set