home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / mailpro / fastwr.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-23  |  1.5 KB  |  57 lines

  1. {$S-,R-,V-,D-,T-}
  2.  
  3. unit FastWr;
  4.  
  5. interface
  6. type     DisplayType = (Monochrome, CGA, EGA, MCGA, VGA);
  7. var      BaseOfScreen:   Word;       {Base address of video memory}
  8.          WaitForRetrace: Boolean;    {Check for snow on color cards?}
  9. procedure FastWrite(St: string; Row, Col, Attr: Byte);
  10. procedure FastWriteNA(St: string; Row, Col: Byte);
  11. procedure ChangeAttribute(Number: Word; Row, Col, Attr: Byte);
  12. procedure MoveFromScreen(var Source, Dest; Length: Word);
  13. procedure MoveToScreen(var Source, Dest; Length: Word);
  14. function CurrentDisplay: DisplayType;
  15. procedure ReinitFastWrite;
  16.  
  17. implementation
  18.  
  19.   {$L FASTWR}
  20.  
  21.   {$F+}
  22.   procedure FastWrite(St: string; Row, Col, Attr: Byte);
  23.     external {FASTWR} ;
  24.  
  25.   procedure FastWriteNA(St: string; Row, Col: Byte);
  26.     external {FASTWR} ;
  27.  
  28.   procedure ChangeAttribute(Number: Word; Row, Col, Attr: Byte);
  29.     external {FASTWR} ;
  30.  
  31.   procedure MoveFromScreen(var Source, Dest; Length: Word);
  32.     external {FASTWR} ;
  33.  
  34.   procedure MoveToScreen(var Source, Dest; Length: Word);
  35.     external {FASTWR} ;
  36.  
  37.   function CurrentDisplay: DisplayType;
  38.     external {FASTWR} ;
  39.  
  40.   function CurrentVideoMode: Byte;
  41.     external {FASTWR} ;
  42.   {$F-}
  43.  
  44.   procedure ReinitFastWrite;
  45.   begin                      {InitFastWrite}
  46.     if CurrentVideoMode = 7 then
  47.       BaseOfScreen:= $B000  {Mono}
  48.     else
  49.       BaseOfScreen:= $B800; {Color}
  50.     WaitForRetrace:= (CurrentDisplay = CGA);
  51.   end;                       {InitFastWrite}
  52.  
  53. begin
  54.   ReinitFastWrite;
  55. end.
  56. 
  57.