Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/is_digit.a @ 2677:c58baa9276c8 lwtools-port
Fix string constants used as numbers
More cases of string constants being used instead of ascii constants.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 10 Jun 2012 14:33:53 -0600 |
parents | 7d70b7e1cb21 |
children | aaba193af04f |
rev | line source |
---|---|
2474 | 1 ***************************************** |
2 | |
3 * See if character in "B" is a digit 0..9 | |
4 | |
5 * OTHER MODULES NEEDED: none | |
6 | |
7 * ENTRY: B=character to test | |
8 | |
9 * EXIT: CC zero=1 if digit, 0 if not | |
10 | |
11 nam Is Char a Digit? | |
12 ttl Assembler Library Module | |
13 | |
14 | |
15 psect IS_DIGIT,0,0,0,0,0 | |
16 | |
17 | |
18 IS_DIGIT: | |
19 cmpb #'0 | |
20 blo no not digit, zero cleared | |
21 cmpb #'9 if equal, zero set | |
22 bhi no not digit, zero cleared | |
23 orcc #%00000100 set zero | |
24 | |
25 no | |
26 rts | |
27 | |
28 endsect | |
29 |