2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 02.06.1998
|
|
|
|
;
|
|
|
|
; int ispunct (int c);
|
|
|
|
;
|
|
|
|
|
|
|
|
.export _ispunct
|
2001-09-08 14:00:41 +00:00
|
|
|
.include "ctype.inc"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
_ispunct:
|
2000-06-08 18:35:04 +00:00
|
|
|
cpx #$00 ; Char range ok?
|
|
|
|
bne @L1 ; Jump if no
|
2000-05-28 13:40:48 +00:00
|
|
|
tay
|
|
|
|
lda __ctype,y ; Get character classification
|
2001-09-08 14:00:41 +00:00
|
|
|
eor #CT_NOT_PUNCT ; NOT (space | control | digit | alpha)
|
|
|
|
and #CT_NOT_PUNCT ; Mask relevant bits
|
2000-05-28 13:40:48 +00:00
|
|
|
rts
|
|
|
|
|
2000-06-08 18:35:04 +00:00
|
|
|
@L1: lda #$00 ; Return false
|
|
|
|
tax
|
|
|
|
rts
|
|
|
|
|