home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / asm / JED.ZIP / CLEAR.SRC < prev    next >
Encoding:
Text File  |  1989-12-12  |  1.1 KB  |  23 lines

  1. ;---------------------------------------------------------------
  2. ;   CLEAR    --  Clears the entire visible screen buffer
  3. ;   Last update 3/16/89
  4. ;
  5. ;      Caller must pass:
  6. ;      In VidAddress:  A FAR pointer to the video refresh buffer
  7. ;      In ClearAtom:   A word containing the video attribute to be
  8. ;                      used in the high byte, and the fill character
  9. ;                      to be used in the low byte.
  10. ;      In BufLength:   The size of the refresh buffer in bytes
  11. ;      Action:     Blasts copies of ClearAtom into the refresh buffer
  12. ;                  until the buffer is filled.
  13. ;---------------------------------------------------------------
  14. Clear      MACRO VidAddress,ClearAtom,BufLength
  15.            les  DI,DWORD PTR VidAddress  ; Load ES and DI from FAR pointer
  16.            mov  AX,ClearAtom   ; Load AX with word to blast into memory
  17.            mov  CX,BufLength   ; Load CX with length of buffer in bytes
  18.            shr  CX,1           ; Divide size of buffer by 2 for word count
  19.            rep  stosw          ; Blast away!
  20.            GotoXY 0,0          ; Move hardware cursor to UL corner of screen
  21.            ENDM
  22.  
  23.