2020-01-02 18:57:03 +01:00
|
|
|
; isdigit.s
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
2020-01-02 18:57:03 +01:00
|
|
|
; This file is part of
|
|
|
|
; cc65 - a freeware C compiler for 6502 based systems
|
|
|
|
;
|
2020-02-02 18:21:25 +01:00
|
|
|
; https://cc65.github.io
|
2020-01-02 18:57:03 +01:00
|
|
|
;
|
|
|
|
; See "LICENSE" file for legal information.
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; int isdigit (int c);
|
|
|
|
;
|
|
|
|
|
2013-05-09 13:56:54 +02:00
|
|
|
.export _isdigit
|
|
|
|
.include "ctype.inc"
|
2020-04-02 22:58:16 +02:00
|
|
|
.import ctypemask
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
_isdigit:
|
2020-04-02 22:58:16 +02:00
|
|
|
jsr ctypemask ; (always clears X)
|
2020-01-02 18:57:03 +01:00
|
|
|
bcs @L1 ; out of range? (everything already clear -> false)
|
|
|
|
and #CT_DIGIT ; mask digit bit
|
2020-04-02 10:03:01 +02:00
|
|
|
@L1: rts
|