;-------------------------routine begins--------------------------+
; ROUTINE FOR CLEAR GRAPHICS SCREEN
;
; FUNCTION: This routine clears the color graphics screen.
; INPUT: None
; OUTPUT: Just to the screen.
; REGISTERS USED:  No registers are modified.
; SEGMENTS REFERENCED:  Upom entry ES: must point to the screen RAM
; at B8000h.
; ROUTINES CALLED:  None
; SPECIAL NOTES: None
;
cls	proc	far
	push	cx		; save registers
	push	ax
;
; set up the registers
	mov	cx,2000h	; word count of whole screen
	mov	ax,0		; zero pattern for screen
	mov	di,ax		; get starting address
 	cld			; go in forward direction
;
; clear screen with a single string operation
	rep	stosw		; this clears screen
;
	pop	ax		; restore registers
	pop	cx
	ret			; return
cls	endp
;-------------------------routine ends---------------------------+
