Sign in Join
Wiki copytemporary

Crt: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-CRT is a unit providing subroutines for programming in text mode. It is similar to ncurses C library. It's intention is to be compatible with the Borland Pascal / Turbo Pascal 7 CRT unit.
2-
3-
4-
5-## Contents
6-
7- * 1 Procedures and Functions
8- * 1.1 Keyboard:
9- * 1.2 Display:
10- * 1.3 Cursor Control:
11- * 1.4 Sound:
12- * 1.5 Delay: (Typically used with sound)
13- * 1.6 File:
14- * 2 Variables and Constants
15- * 2.1 Color Constants:
1+CRT is a unit providing subroutines for programming in text mode. It is similar to ncurses C library. It's intention is to be compatible with the Borland Pascal / Turbo Pascal 7 CRT unit.
162
173## Procedures and Functions
184
195### Keyboard:
20-```
6+
7+``` pascal
218Function KeyPressed: Boolean;
22- Function ReadKey: Char;
9+Function ReadKey: Char;
2310```
2411
2512### Display:
26-```
13+
14+``` pascal
2715Procedure TextMode (Mode: word);
28- Procedure Window(X1,Y1,X2,Y2: Byte);
29- Procedure Window32(X1,Y1,X2,Y2: DWord);
30- Procedure ClrScr;
31- Procedure ClrEol;
32- Procedure InsLine;
33- Procedure DelLine;
34- Procedure TextColor(Color: Byte);
35- Procedure TextBackground(Color: Byte);
36- Procedure LowVideo;
37- Procedure HighVideo;
38- Procedure NormVideo;
16+Procedure Window(X1,Y1,X2,Y2: Byte);
17+Procedure Window32(X1,Y1,X2,Y2: DWord);
18+Procedure ClrScr;
19+Procedure ClrEol;
20+Procedure InsLine;
21+Procedure DelLine;
22+Procedure TextColor(Color: Byte);
23+Procedure TextBackground(Color: Byte);
24+Procedure LowVideo;
25+Procedure HighVideo;
26+Procedure NormVideo;
3927```
4028
4129### Cursor Control:
42-```
30+
31+``` pascal
4332Procedure cursoron;
44- Procedure cursoroff;
45- Procedure cursorbig;
46- Procedure GotoXY(X,Y: tcrtcoord);
47- Procedure GotoXY32(X,Y: DWord);
48- Function WhereX: tcrtcoord;
49- Function WhereY: tcrtcoord;
50- Function WhereX32: DWord;
51- Function WhereY32: DWord;
33+Procedure cursoroff;
34+Procedure cursorbig;
35+Procedure GotoXY(X,Y: tcrtcoord);
36+Procedure GotoXY32(X,Y: DWord);
37+Function WhereX: tcrtcoord;
38+Function WhereY: tcrtcoord;
39+Function WhereX32: DWord;
40+Function WhereY32: DWord;
5241```
5342
5443### Sound:
55-```
44+
45+``` pascal
5646Procedure Sound(Hz: Word);
57- Procedure NoSound;
47+Procedure NoSound;
5848```
5949
6050### Delay: (Typically used with sound)
61-```
62-Procedure Delay(MS: Word);
63-```
6451
65-### File:
52+``` pascal
53+Procedure Delay(MS: Word);
6654```
67-Procedure AssignCrt(var F: Text);
55+
56+===<File:===>
57+
58+``` pascal
59+Procedure AssignCrt(var F: Text);
6860```
6961
7062## Variables and Constants
7163
7264### Color Constants:
73-```
65+
66+``` pascal
7467const
75- Black = 0;
76- Blue = 1;
77- Green = 2;
78- Cyan = 3;
79- Red = 4;
80- Magenta = 5;
81- Brown = 6;
82- LightGray = 7;
83- DarkGray = 8;
84- LightBlue = 9;
85- LightGreen = 10;
86- LightCyan = 11;
87- LightRed = 12;
88- LightMagenta = 13;
89- Yellow = 14;
90- White = 15;
91- Blink = 128;
68+ Black = 0;
69+ Blue = 1;
70+ Green = 2;
71+ Cyan = 3;
72+ Red = 4;
73+ Magenta = 5;
74+ Brown = 6;
75+ LightGray = 7;
76+ DarkGray = 8;
77+ LightBlue = 9;
78+ LightGreen = 10;
79+ LightCyan = 11;
80+ LightRed = 12;
81+ LightMagenta = 13;
82+ Yellow = 14;
83+ White = 15;
84+ Blink = 128;
9285```
9386
9487---
95-*From the Free Pascal wiki, page "Crt", as the Internet Archive kept it on 2022-12-29. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
88+*From the Free Pascal wiki, page "Crt", as it stood on 2019-12-27 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
89+Category: Units

Back to history