annotate lib/alib/strcpy.as @ 2784:2594295f9cc7 lwtools-port

Merged Drencor's work
author Boisy Pitre <boisy.pitre@nuance.com>
date Sat, 26 Jan 2013 17:19:06 -0600
parents 03f26e88b809
children
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 * STRCPY: copy 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
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6 * OTHER MODULES NEEDED: STRNCPY
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * ENTRY: X=start of string to move
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9 * Y=buffer for copy of string
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * EXIT: all regs preserved (except cc)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14 nam Copy Null Term. String
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2474
diff changeset
18 section .text
2474
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 STRCPY:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21 pshs d
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 ldd #$ffff pass very long value to STRNCPY
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 lbsr STRNCPY move it
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 puls d,pc
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27
2782
aaba193af04f Updated code to use lwasm/lwlink
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2474
diff changeset
28