]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/iscntrl.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / iscntrl.s
index 6d29cb586a9ae55bb31929e74b1dbaf6dad79fc2..d94fddc272d92700eb323b742b5f00986818d347 100644 (file)
@@ -5,12 +5,17 @@
 ;
 
        .export         _iscntrl
-       .import         __ctype
+       .include        "ctype.inc"
 
 _iscntrl:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-       and     #$10            ; Mask control character bit
+               and     #CT_CTRL        ; Mask control character bit
        rts
 
+@L1:   lda     #$00            ; Return false
+       tax
+       rts