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

;SUB RELPCOPY(BYVAL DESTSEG,BYVAL SRCSEG)
;STACK
;DEST SEG	=6
;SOURCE SEG	=4
;QB RETURN SEG	=2
;QB RETURN OFF	=0
;DS:SI		=SRC SEG:SRC OFF
;ES:DI		=DEST SEG:DEST OFF

PUBLIC RELPCOPY
RELPCOPY PROC

MOV AX,DS	;SAVE DS
MOV BX,BP	;SAVE BP
MOV BP,SP	;POINT STACK POINTER TO BP
MOV ES,[BP+6]	;POINT ADDRESS OF DEST TO ES
MOV DS,[BP+4]	;POINT ADDRESS OF SRC TO DS
XOR DI,DI	;ZERO OUT DEST OFFSET
XOR SI,SI	;ZERO OUT SRC OFFSET
MOV CX,16000    ;INIT COUNTER(DOUBLE WORD)
REP MOVSD	;COPY IT
MOV DS,AX	;RESTORE DS
MOV BP,BX	;RESTORE BP
RET 4

RELPCOPY ENDP

END

