]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isxdigit.s
Disable the IRQ before calling mouse_uninstall
[cc65] / libsrc / common / isxdigit.s
index a3184d17beb3731426389b8f90942efdbfb3a373..50146e82e366caf56982c9e231d3c3e5e24cd42b 100644 (file)
@@ -5,11 +5,17 @@
 ;
 
        .export         _isxdigit
-       .import         __ctype
+       .include        "ctype.inc"
 
 _isxdigit:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-               and     #$08            ; Mask xdigit bit
+               and     #CT_XDIGIT      ; Mask xdigit bit
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts