]> git.sur5r.net Git - cc65/blob - libsrc/common/ispunct.s
Remove #pragmas to switch to the RODATA segment since the compiler will do
[cc65] / libsrc / common / ispunct.s
1 ;
2 ; Ullrich von Bassewitz, 02.06.1998
3 ;
4 ; int ispunct (int c);
5 ;
6
7         .export         _ispunct
8         .import         __ctype
9
10 _ispunct:
11         cpx     #$00            ; Char range ok?
12         bne     @L1             ; Jump if no
13         tay
14         lda     __ctype,y       ; Get character classification
15         eor     #$37            ; NOT (space | control | digit | char)
16         and     #$37            ; Mask relevant bits
17         rts
18
19 @L1:    lda     #$00            ; Return false
20         tax
21         rts
22