home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / CRT.SWG / 0001_Faster Clear Screen.pas next >
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  451 b   |  24 lines

  1.  
  2. { Do you think this function would work faster than the Pascal CLRSCR? }
  3.  
  4. PROGRAM CLEAR;
  5.  
  6. Uses CRT;
  7.  
  8. VAR
  9.    Attrib : Byte;
  10.  
  11. BEGIN
  12.    TextBackground(1);          { I fill the screen with blue to see }
  13.    CLRSCR;                     { the asm code work.. :)             }
  14.    Attrib := 15 + 0 * 16;
  15.    asm
  16.      mov ah, 09h
  17.      mov al, 32
  18.      mov bh, 00h
  19.      mov bl, byte ptr Attrib
  20.      mov cx, 2000
  21.      Int 10h
  22.    end;
  23. END.
  24.