]> git.sur5r.net Git - cc65/blob - libsrc/common/isgraph.s
Fixes for the watcom makefiles:
[cc65] / libsrc / common / isgraph.s
1 ;
2 ; Ullrich von Bassewitz, 02.06.1998
3 ;
4 ; int isgraph (int c);
5 ;
6
7         .export         _isgraph
8         .include        "ctype.inc"
9
10 _isgraph:
11         cpx     #$00            ; Char range ok?
12         bne     @L1             ; Jump if no
13         tay
14         lda     __ctype,y       ; Get character classification
15         eor     #CT_CTRL_SPACE  ; NOT control and NOT space
16         and     #CT_CTRL_SPACE  ; Mask character bits
17         rts
18
19 @L1:    lda     #$00            ; Return false
20         tax
21         rts
22