]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/stricmp.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / stricmp.s
index 73cb580cbfc171a9cd56732aeb3338e8fc0a3da7..03638c8e2892befb39459cfdce1b329ebffb064f 100644 (file)
@@ -10,6 +10,7 @@
        .import         __ctype
        .importzp       ptr1, ptr2, tmp1
 
+        .include        "ctype.inc"
 
 _stricmp:
 _strcasecmp:
@@ -23,7 +24,7 @@ _strcasecmp:
 loop:          lda     (ptr2),y        ; get char from second string
        tax
        lda     __ctype,x       ; get character classification
-       and     #$01            ; lower case char?
+               and     #CT_LOWER       ; lower case char?
        beq     L1              ; jump if no
        txa                     ; get character back
        clc
@@ -34,13 +35,13 @@ L1: stx     tmp1            ; remember upper case equivalent
        lda     (ptr1),y        ; get character from first string
        tax
        lda     __ctype,x       ; get character classification
-       and     #$01            ; lower case char?
+       and     #CT_LOWER       ; lower case char?
                beq     L2              ; jump if no
        txa                     ; get character back
        clc
                adc     #<('A'-'a')     ; make upper case char
        tax
-
+                                
 L2:    cpx     tmp1            ; compare characters
        bne     L3
        txa                     ; end of strings?