]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isblank.s
Added mouse module from C64
[cc65] / libsrc / common / isblank.s
index f3564ec637a6296c16597997cd5adf0ee2ba2ee9..6da645a92c55a8a18d8c3c64016e4fc13387490d 100644 (file)
@@ -7,11 +7,17 @@
 ;
 
        .export         _isblank
-       .import         __ctype
+       .include        "ctype.inc"
 
 _isblank:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-               and     #$80            ; Mask blank bit
+               and     #CT_SPACE_TAB   ; Mask blank bit
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts