mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-09-27 20:56:05 +00:00
fix tolower/toupper to work with EOF/-1
This commit is contained in:
parent
578bda8439
commit
6ebb56af57
@ -498,6 +498,8 @@ tolower start
|
|||||||
pla
|
pla
|
||||||
sta 1,S
|
sta 1,S
|
||||||
|
|
||||||
|
txa
|
||||||
|
bmi lb2
|
||||||
lda >__ctype+1,X branch if the character is not uppercase
|
lda >__ctype+1,X branch if the character is not uppercase
|
||||||
and #_upper
|
and #_upper
|
||||||
beq lb1
|
beq lb1
|
||||||
@ -506,7 +508,7 @@ tolower start
|
|||||||
rtl
|
rtl
|
||||||
|
|
||||||
lb1 txa return the input character
|
lb1 txa return the input character
|
||||||
rtl
|
lb2 rtl
|
||||||
end
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
@ -530,6 +532,8 @@ toupper start
|
|||||||
pla
|
pla
|
||||||
sta 1,S
|
sta 1,S
|
||||||
|
|
||||||
|
txa
|
||||||
|
bmi lb2
|
||||||
lda >__ctype+1,X branch if the character is not lowercase
|
lda >__ctype+1,X branch if the character is not lowercase
|
||||||
and #_lower
|
and #_lower
|
||||||
beq lb1
|
beq lb1
|
||||||
@ -538,7 +542,7 @@ toupper start
|
|||||||
rtl
|
rtl
|
||||||
|
|
||||||
lb1 txa return the input character
|
lb1 txa return the input character
|
||||||
rtl
|
lb2 rtl
|
||||||
end
|
end
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user