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

;SUB RELCOMPRESS(BYVAL DESTSEG,BYVAL DESTOFF,BYVAL SRCSEG)
;STACK
;DEST SEG       =8
;DESTOFF        =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 RELCOMPRESS
RELCOMPRESS PROC
MOV AX,DS       ;SAVE DS                                        
MOV BX,BP	;SAVE BP
MOV BP,SP	;POINT STACK POINTER TO BP
MOV ES,[BP+8]   ;POINT ADDRESS OF DEST TO ES
MOV DS,[BP+4]	;POINT ADDRESS OF SRC TO DS
MOV DI,[BP+6]   ;POINT CORRECT OFFSET
XOR SI,SI	;ZERO OUT SRC OFFSET
;REGS SUMMARY
;CX FREE,DX FREE
MOV DX,100      ;HALF SCREEN Y  HEIGHT COUNTER
LBL_PLOT_LINE:
MOV CX,80       ;INIT COUNTER(DOUBLE WORD) 320/4
REP MOVSD	;COPY IT
ADD SI,320      ;ADD ONE LINE TO SRC
DEC DX          ;DEC HEIGHT COUNTER
JNZ LBL_PLOT_LINE
MOV DS,AX	;RESTORE DS
MOV BP,BX	;RESTORE BP
RET 6

RELCOMPRESS ENDP

END

