2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 02.06.1998
|
|
|
|
;
|
|
|
|
; int ispunct (int c);
|
|
|
|
;
|
|
|
|
|
|
|
|
.export _ispunct
|
|
|
|
.import __ctype
|
|
|
|
|
|
|
|
_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
|
|
|
|
eor #$37 ; NOT (space | control | digit | char)
|
|
|
|
and #$37 ; Mask relevant bits
|
|
|
|
rts
|
|
|
|
|
2000-06-08 18:35:04 +00:00
|
|
|
@L1: lda #$00 ; Return false
|
|
|
|
tax
|
|
|
|
rts
|
|
|
|
|