]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/strlower.s
Use named constants from ctype.inc instead of hard coded numeric values.
[cc65] / libsrc / common / strlower.s
index 858b8e181306aa627eec6574f3241527667dfbbe..b76133ce76da6de2e148ad11b177efc3283d1060 100644 (file)
@@ -12,6 +12,8 @@
        .import         __ctype
        .importzp       ptr1, ptr2
 
+        .include        "ctype.inc"
+
 _strlower:
 _strlwr:
        sta     ptr1            ; Save s (working copy)
@@ -24,7 +26,7 @@ loop: lda     (ptr1),y        ; get character
        beq     L9              ; jump if done
        tax
        lda     __ctype,x       ; get character classification
-       and     #$02            ; upper case char?
+               and     #CT_UPPER       ; upper case char?
        beq     L1              ; jump if no
        txa                     ; get character back into accu
        sec