]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isspace.s
Just presume alternate charset to be active on the //e - how shouldn't it if conio...
[cc65] / libsrc / common / isspace.s
index 1c6cc2e8a6aa763217177d71b8591c8c743c1b75..67530c95e388c773f92f5fb5a93749dec28ffdcd 100644 (file)
@@ -5,11 +5,17 @@
 ;
 
        .export         _isspace
-       .import         __ctype
+               .include        "ctype.inc"
 
 _isspace:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-               and     #$60            ; Mask space bits
+               and     #(CT_SPACE | CT_OTHER_WS)   ; Mask space bits
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts