Use common naming scheme for tolowerdirect
This commit is contained in:
@@ -5,11 +5,11 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.export _strstr, _strcasestr
|
.export _strstr, _strcasestr
|
||||||
.import popptr1, return0, tolower_a
|
.import popptr1, return0, tolowerdirect
|
||||||
.importzp ptr1, ptr2, ptr3, ptr4, tmp1, tmp2
|
.importzp ptr1, ptr2, ptr3, ptr4, tmp1, tmp2
|
||||||
|
|
||||||
maybe_lower: ; Lowercase char in A if needed
|
maybe_lower: ; Lowercase char in A if needed
|
||||||
jmp tolower_a ; patched on entry with either JMP or RTS
|
jmp tolowerdirect ; patched on entry with either JMP or RTS
|
||||||
|
|
||||||
_strstr:
|
_strstr:
|
||||||
ldy #$60 ; RTS
|
ldy #$60 ; RTS
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
; int tolower (int c);
|
; int tolower (int c);
|
||||||
;
|
;
|
||||||
|
|
||||||
.export _tolower, tolower_a
|
.export _tolower, tolowerdirect
|
||||||
.include "ctype.inc"
|
.include "ctype.inc"
|
||||||
.import ctypemaskdirect
|
.import ctypemaskdirect
|
||||||
|
|
||||||
_tolower:
|
_tolower:
|
||||||
cpx #$00 ; out of range?
|
cpx #$00 ; out of range?
|
||||||
bne out ; if so, return the argument unchanged
|
bne out ; if so, return the argument unchanged
|
||||||
tolower_a:
|
tolowerdirect:
|
||||||
pha ; save char
|
pha ; save char
|
||||||
jsr ctypemaskdirect ; get character classification
|
jsr ctypemaskdirect ; get character classification
|
||||||
and #CT_UPPER ; upper case char?
|
and #CT_UPPER ; upper case char?
|
||||||
|
|||||||
Reference in New Issue
Block a user