Sign in Join
Wiki copytemporary

Crt: what changed

Revision 1 to 2. 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.
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.
22
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:
16+
317## Procedures and Functions
418
519### Keyboard:
6-
7-``` pascal
20+```
821Function KeyPressed: Boolean;
9-Function ReadKey: Char;
22+ Function ReadKey: Char;
1023```
1124
1225### Display:
13-
14-``` pascal
26+```
1527Procedure TextMode (Mode: word);
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;
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;
2739```
2840
2941### Cursor Control:
30-
31-``` pascal
42+```
3243Procedure cursoron;
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;
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;
4152```
4253
4354### Sound:
44-
45-``` pascal
55+```
4656Procedure Sound(Hz: Word);
47-Procedure NoSound;
57+ Procedure NoSound;
4858```
4959
5060### Delay: (Typically used with sound)
51-
52-``` pascal
53-Procedure Delay(MS: Word);
5461```
55-
56-===<File:===>
62+Procedure Delay(MS: Word);
63+```
5764
58-``` pascal
59-Procedure AssignCrt(var F: Text);
65+### File:
6066```
67+Procedure AssignCrt(var F: Text);
68+```
6169
6270## Variables and Constants
6371
6472### Color Constants:
65-
66-``` pascal
73+```
6774const
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;
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;
8592```
8693
8794---
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
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).*

Back to history