]> git.sur5r.net Git - cc65/blob - libsrc/common/isgraph.s
fsetpos.o fgetpos.o rewind.o fseek.o ftell.o: new object files
[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         .import         __ctype
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     #$30            ; NOT control and NOT space
16         and     #$30            ; Mask character bits
17         rts
18
19 @L1:    lda     #$00            ; Return false
20         tax
21         rts
22