Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/strlen.a @ 2765:0bd16cca86b7
Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
author | drencor-xeen |
---|---|
date | Thu, 17 Jan 2013 11:03:26 -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 |