]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isalpha.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / isalpha.s
index 420d6b3dc0fd1fe3fbee489081167a9a48b6b4ef..624dec682ae5e61faa29e12610c70b4d5c18965b 100644 (file)
@@ -5,11 +5,17 @@
 ;
 
        .export         _isalpha
-       .import         __ctype
+       .include        "ctype.inc"
 
 _isalpha:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-       and     #$03            ; Mask character bits
+               and     #CT_ALPHA       ; Mask character bits
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts