File:  [MW Coherent from dump] / coherent / b / lib / libc / string / i8086 / memcpy.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

//////////
/ i8086 C string library.
/ memcpy()
/ ANSI 4.11.2.1.
//////////

//////////
/ char *
/ memcpy(To, From, Count)
/ char *To, *From;
/ int Count;
/
/ Copy Count bytes from From to To.
//////////

#include <larges.h>

To	=	LEFTARG
From	=	To+DPL
Count	=	From+DPL

	Enter(memcpy_)
	mov	cx, Count(bp)	/ Count to CX
	Lds	si, From(bp)	/ From address to DS:SI
	Les	di, To(bp)	/ To address to ES:DI
	mov	ax, di		/ Result to AX
#if	LARGEDATA
	mov	dx, es		/ or DX:AX
#endif
	cld
	rep
	movsb
	Leave

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.