annotate lib/alib/strncpy.a @ 2765:0bd16cca86b7

Updated rules.mak for all the os9 format's to format the entire disk. People were having some issues with the disk images not being formatted to their full capacity and preventing some functions from working.
author drencor-xeen
date Thu, 17 Jan 2013 11:03:26 -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