]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isalnum.s
Disable the IRQ before calling mouse_uninstall
[cc65] / libsrc / common / isalnum.s
index e8654ad9fbd0c26e4722d2de8360359ff4a28c32..26fd7a24c83a6c2c5eeae2511d0bc7776af6f802 100644 (file)
@@ -5,11 +5,17 @@
 ;
 
        .export         _isalnum
-       .import         __ctype
+       .include        "ctype.inc"
 
 _isalnum:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-       and     #$07            ; Mask character/digit bits
+       and     #CT_ALNUM       ; Mask character/digit bits
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts