cc65/libsrc/common/isascii.s

24 lines
562 B
ArmAsm
Raw Normal View History

2020-01-02 17:57:03 +00:00
; isascii.s
;
; This file is part of
; cc65 - a freeware C compiler for 6502 based systems
;
2020-02-02 17:21:25 +00:00
; https://cc65.github.io
2020-01-02 17:57:03 +00:00
;
; See "LICENSE" file for legal information.
;
; int isascii (int c);
;
.export _isascii
2022-08-03 22:25:04 +00:00
.import return0
2020-01-02 17:57:03 +00:00
_isascii:
2020-02-02 17:21:25 +00:00
asl a ; high-bit to carry
txa ; check range of input param
bne @L1 ; out-of bounds?
adc #$FF ; calculate return value based on carry
2020-01-02 17:57:03 +00:00
rts
2022-08-03 22:25:04 +00:00
@L1: jmp return0 ; return false