]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isprint.s
Removed closeallstreams
[cc65] / libsrc / common / isprint.s
index e82e6131274ae0851d6b2e4ed8492393d285f63d..956b54b887dfdfed19410265c9956aa0a2d559da 100644 (file)
@@ -5,12 +5,18 @@
 ;
 
        .export         _isprint
-       .import         __ctype
+               .include        "ctype.inc"
 
 _isprint:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-       eor     #$10            ; NOT a control char
-               and     #$10            ; Mask control char bit
+               eor     #CT_CTRL        ; NOT a control char
+               and     #CT_CTRL        ; Mask control char bit
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts