annotate lib/alib/strncpy.a @ 2668:07441dfebc27 lwtools-port

Make tocgen build with lwasm lwasm does not treat a trailing colon as part of the symbol name. Removed trailing colons on symbol references.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 13:35:44 -0600
parents 7d70b7e1cb21
children aaba193af04f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 **********************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * STRNCPY: copy N bytes of a null terminated string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4 * User must ensure there is room in buffer!!!
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * If N>string length only N bytes will be moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 * OTHER MODULES NEEDED: STRLEN, MEMMOVE
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12 * EXIT: D = actual number of bytes moved
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13 * all other regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16 nam Copy partial String
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 psect STRNCPY,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 STRNCPY:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 pshs d bytes wanted to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 lbsr STRLEN find length of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25 addd #1 move NULL also
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 cmpd ,s get smaller of passed/actual size
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 bls skip use actual leng
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 ldd ,s use passed leng²²
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 skip
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 lbsr MEMMOVE move it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 leas 2,s
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 rts
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
36