Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/strhlen.as @ 2831:7c8442122235 lwtools-port
fix level 1 builds
author | lfantoniosi |
---|---|
date | Tue, 18 Jun 2013 21:41:46 -0400 |
parents | 03f26e88b809 |
children |
rev | line source |
---|---|
2474 | 1 ********************************** |
2 | |
3 * String Length: find length of sign-bit terminated string. | |
4 * note: sign-bit set byte IS included in count. | |
5 | |
6 * OTHER MODULES NEEDED: none | |
7 | |
8 | |
9 * ENTRY: X=start of string | |
10 | |
11 | |
12 * EXIT: D=length | |
13 * all other regs (except cc) preserved | |
14 | |
15 | |
16 nam Find sign-bit term. String Length | |
17 ttl Assembler Library Module | |
18 | |
19 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
20 section .text |
2474 | 21 |
22 STRHLEN: | |
23 pshs x | |
24 clra it'll be at least one byte long | |
25 clrb | |
26 | |
27 loop | |
28 addd #1 bump count | |
29 tst ,x+ end? | |
30 bpl loop | |
31 | |
32 puls x,pc | |
33 | |
34 endsect | |
35 | |
2782
aaba193af04f
Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2474
diff
changeset
|
36 |