1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Computer Consoles Inc. 7 * 8 * %sccs.include.proprietary.c% 9 */ 10 11#ifndef lint 12 .asciz "@(#)s_copy_s.s 5.2 (Berkeley) 04/12/91" 13#endif /* not lint */ 14 15.data 16.text 17LL0:.align 1 18.globl _s_copy 19.set MASK__,0x1004 /* save r2, r12 */ 20.data 21.text 22_s_copy:.word MASK__ 23movl 4(fp),r1 /* dest addr */ 24movl 8(fp),r0 /* src addr */ 25movl 12(fp),r12 /* dest length */ 26cmpl r12,16(fp) /* if (ldest <= lsrc) */ 27jgtr L16 28movl r12, r2 /* copy according to ldest */ 29movs3 30ret 31L16: /* else */ 32movl 16(fp),r2 /* copy according to lsrc */ 33movs3 34addl2 4(fp),r12 /* and pad with spaces */ 35L20:movb $32,(r1) 36incl r1 37cmpl r1,r12 38jlssu L20 39ret 40 41