Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/strlen.as @ 2802:58ca94b06908 lwtools-port
now built from defs files
author | Boisy Pitre <boisy.pitre@nuance.com> |
---|---|
date | Fri, 01 Feb 2013 19:26:44 -0600 |
parents | 03f26e88b809 |
children |
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 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
15 section .text |
2474 | 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 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
30 |