comparison lib/alib/strhlen.as @ 2783:03f26e88b809 lwtools-port

Renamed files and setup for lwasm/lwlink work
author Boisy Pitre <boisy.pitre@nuance.com>
date Sat, 26 Jan 2013 17:18:24 -0600
parents lib/alib/strhlen.a@aaba193af04f
children
comparison
equal deleted inserted replaced
2782:aaba193af04f 2783:03f26e88b809
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
20 section .text
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
36