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

;SUB RELCLS(BYVAL DESTSEG,BYVAL C)
;STACK
;DEST SEG	=6
;C              =4
;QB RETURN SEG	=2
;QB RETURN OFF	=0
;ES:DI		=DEST SEG:DEST OFF

PUBLIC RELCLS
RELCLS PROC

MOV DX,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
XOR DI,DI	;ZERO OUT DEST OFFSET
MOV AL,[BP+4]   ;COPY COLOR TO AL
MOV AH,AL       ;WORD SIZE 16 BIT
MOV CX,AX       ;SAVE TEMPORARILY
SHL EAX,16      ;ADD 2 BYTES TO TAIL
MOV AX,CX       ;SWAP IT
MOV CX,16000    ;INIT COUNTER(DOUBLE WORD)
REP STOSD       ;COPY IT
MOV DS,DX       ;RESTORE DS
MOV BP,BX	;RESTORE BP
RET 4

RELCLS ENDP

END



