]> git.sur5r.net Git - cc65/blob - libsrc/common/isgraph.s
Adjusted C declarations to the changed static driver names.
[cc65] / libsrc / common / isgraph.s
1 ;
2 ; 1998-06-02, Ullrich von Bassewitz
3 ; 2013-05-01, Greg King
4 ;
5 ; int isgraph (int c);
6 ;
7
8         .export         _isgraph
9         .include        "ctype.inc"
10
11 _isgraph:
12         cpx     #>0             ; Char range OK?
13         bne     @L1             ; Jump if no
14         tay
15         lda     __ctype,y       ; Get character classification
16         and     #CT_CTRL_SPACE  ; Mask character bits
17         cmp     #1              ; If false, then set "borrow" flag
18         lda     #0
19         sbc     #0              ; Invert logic
20         rts                     ; Return NOT control and NOT space
21
22 @L1:    lda     #<0             ; Return false
23         tax
24         rts
25