home *** CD-ROM | disk | FTP | other *** search
- {*******************************************************}
- { }
- { Turbo Pascal Version 4.0 }
- { Interface-Dolumentation zu CRT }
- { }
- { Copyright (c) 1987 Borland International, Inc. }
- { }
- {*******************************************************}
-
- {$D-,I-,S-}
-
- unit Crt;
-
- interface
-
- const
-
- { Text-Videomodi }
- BW40 = 0; { 40x25 S/W für Farbgrafik-Adapter }
- CO40 = 1; { 40x25 farbig }
- BW80 = 2; { 80x25 S/W für Farbgrafik-Adapter }
- CO80 = 3; { 80x25 farbig }
- Mono = 7; { 80x25 für Monochrom-Adapter }
- Font8x8 = 256; { Additionsfaktor für 8x8-Zeichensatz und
- 43 (EGA) bzw. 50 Textzeilen (VGA) }
-
- C40 = CO40; { Konstanten für die Kompatibilität zur }
- C80 = CO80; { Version 3.0 (und dem Handbuch) }
-
- { Farben für Vorder- und Hintergrund }
- Black = 0;
- Blue = 1;
- Green = 2;
- Cyan = 3;
- Red = 4;
- Magenta = 5;
- Brown = 6;
- LightGray = 7;
-
- { nur für Vordergrund }
- DarkGray = 8;
- LightBlue = 9;
- LightGreen = 10;
- LightCyan = 11;
- LightRed = 12;
- LightMagenta = 13;
- Yellow = 14;
- White = 15;
-
- { Additionsfaktor für blinkenden Text }
- Blink = 128;
-
-
- { ------------- Variablen ------------------------- }
- var
- CheckBreak: Boolean; { Prüfung auf Ctrl-Break }
- CheckEOF: Boolean; { Prüfung auf Ctrl-Z }
- DirectVideo: Boolean; { direkter Zugriff auf den Bildspeicher }
- CheckSnow: Boolean; { Synchronisationsroutine für CGA-Karten }
- LastMode: Word; { "letzter" (Text-)Videomodus }
- TextAttr: Byte; { momentanes Zeichenattribut }
- WindMin: Word; { linke obere Ecke des Textfensters }
- WindMax: Word; { rechte untere Ecke des Textfensters }
-
- SaveInt1B: Pointer; { Gespeicherter Interrupt-Vektor $1B des Systems }
-
-
- { ------------- Routinen ------------------------ }
- procedure AssignCrt(var F: Text);
- function KeyPressed: Boolean;
- function ReadKey: Char;
- procedure TextMode(Mode: Word);
- procedure Window(X1,Y1,X2,Y2: Byte);
- procedure GotoXY(X,Y: Byte);
- function WhereX: Byte;
- function WhereY: Byte;
- procedure ClrScr;
- procedure ClrEol;
- procedure InsLine;
- procedure DelLine;
- procedure TextColor(Color: Byte);
- procedure TextBackground(Color: Byte);
- procedure LowVideo;
- procedure HighVideo;
- procedure NormVideo;
- procedure Delay(MS: Word);
- procedure Sound(Hz: Word);
- procedure NoSound;
-
- implementation