Mercurial > hg > Members > kono > nitros9-code
annotate lib/alib/strhlen.as @ 3154:d29a92fff7f2
coco3fpga: Rename SD disk images to .img
To avoid confusion since they are not bootable disks,
but to be raw copied to the /sd0 partition on the
CoCo3FPGA SD card.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Tue, 07 Feb 2017 00:37:28 +0100 |
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 |