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