;--------------------------------------------------------------- ; CLEAR -- Clears the entire visible screen buffer ; Last update 9/17/99 ; ; 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. ;--------------------------------------------------------------- %macro Clear 3 ;VidAddress,ClearAtom,BufLength les DI,DWORD %1 ; Load ES and DI from FAR pointer mov AX,%2 ; Load AX with word to blast into memory mov CX,%3 ; Load CX with length of buffer in bytes shr CX,1 ; Divide size of buffer by 2 for word count cld ; Set direction flag so we blast up-memory rep stosw ; Blast away! GotoXY 0,0 ; Move hardware cursor to UL corner of screen %endmacro