MODEL MEDIUM,BASIC
.STACK 20H
.386
.CODE

;SUB RELMEMCOPY(BYVAL DESTSEG,BYVAL DESTOFF%,BYVAL SRCSEG,BYVAL SRCOFF, BYVAL NUMBYTES)
;STACK
;DEST SEG       =12
;DEST OFF       =10
;SRC  SEG       =8
;SRC  OFF       =6
;NUM BYTES      =4
;QB RETURN SEG	=2
;QB RETURN OFF	=0
;ES:DI		=DEST SEG:DEST OFF
;DS:SI          =SRC SEG:SRC OFF

PUBLIC RELMEMCOPY
RELMEMCOPY PROC

MOV BX,BP
MOV DX,DS

MOV BP,SP
MOV DI,[BP+10]
MOV SI,[BP+6]

MOV ES,[BP+12]
MOV DS,[BP+8]

MOV CX,[BP+4]
SHR CX,2
REP MOVSD
MOV CX,[BP+4]
AND CX,3
REP MOVSB

MOV BP,BX
MOV DS,DX

RET 10

RELMEMCOPY ENDP
END
