xref: /original-bsd/usr.bin/f77/libF77/CCI/s_copy_s.s (revision 4d1ce0b0)
1#	"@(#)s_copy_s.s	5.1 (Berkeley) 11/03/86"
2
3.data
4.text
5LL0:.align	1
6.globl	_s_copy
7.set	MASK__,0x1004		/* save r2, r12 */
8.data
9.text
10_s_copy:.word	MASK__
11movl	4(fp),r1		/* dest addr */
12movl	8(fp),r0		/* src addr */
13movl	12(fp),r12		/* dest length */
14cmpl	r12,16(fp)		/* if (ldest <= lsrc) */
15jgtr	L16
16movl	r12, r2			/* copy according to ldest */
17movs3
18ret
19L16: 				/* else */
20movl	16(fp),r2		/* copy according to lsrc */
21movs3
22addl2	4(fp),r12		/* and pad with spaces */
23L20:movb	$32,(r1)
24incl	r1
25cmpl	r1,r12
26jlssu	L20
27ret
28
29