home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Large Pack of OldSkool DOS MOD Trackers
/
cdfm.zip
/
COPYMEM.RT
< prev
next >
Wrap
Text File
|
1993-03-02
|
646b
|
29 lines
public _copymem
;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
; Copy a block of memory to another (possibly overlapping) location
; In:
; ECX - length of block
; ESI -> source
; EDI -> destination
; Out:
;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
_copymem:
push ecx
push esi
push edi
cmp esi,edi
jae short copymemf0
add esi,ecx
add edi,ecx
dec esi
dec edi
std
copymemf0:
rep movsb
cld
pop edi
pop esi
pop ecx
ret