Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/strlen.a @ 2738:d25fd78e727a
Updated rules.mak to correct for non booting dw3 and becker disk images.
author | drencor-xeen |
---|---|
date | Thu, 03 Jan 2013 22:47:46 -0600 |
parents | 7d70b7e1cb21 |
children | aaba193af04f |
rev | line source |
---|---|
2474 | 1 ********************************** |
2 | |
3 * String Length: find length of null terminated string. | |
4 * note:null NOT included in count. | |
5 | |
6 * ENTRY: X=start of string | |
7 | |
8 * EXIT: D=length | |
9 * all other regs (except cc) preserved | |
10 | |
11 nam Find String Length | |
12 ttl Assembler Library Module | |
13 | |
14 | |
15 psect STRLEN,0,0,0,0,0 | |
16 | |
17 STRLEN: | |
18 pshs x | |
19 ldd #-1 comp for inital inc | |
20 | |
21 loop | |
22 addd #1 bump count | |
23 tst ,x+ end? | |
24 bne loop | |
25 | |
26 puls x,pc | |
27 | |
28 endsect | |
29 | |
30 |