home *** CD-ROM | disk | FTP | other *** search
- ;---------------------------------------------------------------
- ; CLEAR -- Clears the entire visible screen buffer
- ; Last update 3/16/89
- ;
- ; Caller must pass:
- ; In VidAddress: A FAR pointer to the video refresh buffer
- ; In ClearAtom: A word containing the video attribute to be
- ; used in the high byte, and the fill character
- ; to be used in the low byte.
- ; In BufLength: The size of the refresh buffer in bytes
- ; Action: Blasts copies of ClearAtom into the refresh buffer
- ; until the buffer is filled.
- ;---------------------------------------------------------------
- Clear MACRO VidAddress,ClearAtom,BufLength
- les DI,DWORD PTR VidAddress ; Load ES and DI from FAR pointer
- mov AX,ClearAtom ; Load AX with word to blast into memory
- mov CX,BufLength ; Load CX with length of buffer in bytes
- shr CX,1 ; Divide size of buffer by 2 for word count
- rep stosw ; Blast away!
- GotoXY 0,0 ; Move hardware cursor to UL corner of screen
- ENDM
-