Sign in Join
Wiki copytemporary

Crt: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Crt

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+## Procedures and Functions
6+
7+### Keyboard:
8+```
9+Function KeyPressed: Boolean;
10+ Function ReadKey: Char;
11+```
12+
13+### Display:
14+```
15+Procedure 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;
27+```
28+
29+### Cursor Control:
30+```
31+Procedure cursoron;
32+ Procedure cursoroff;
33+ Procedure cursorbig;
34+ Procedure GotoXY(X,Y: tcrtcoord);
35+ Procedure GotoXY32(X,Y: DWord);
36+ Function WhereX: tcrtcoord;
37+ Function WhereY: tcrtcoord;
38+ Function WhereX32: DWord;
39+ Function WhereY32: DWord;
40+```
41+
42+### Sound:
43+```
44+Procedure Sound(Hz: Word);
45+ Procedure NoSound;
46+```
47+
48+### Delay: (Typically used with sound)
49+```
50+Procedure Delay(MS: Word);
51+```
52+
53+### File:
54+```
55+Procedure AssignCrt(var F: Text);
56+```
57+
58+## Variables and Constants
59+
60+### Color Constants:
61+```
62+const
63+ Black = 0;
64+ Blue = 1;
65+ Green = 2;
66+ Cyan = 3;
67+ Red = 4;
68+ Magenta = 5;
69+ Brown = 6;
70+ LightGray = 7;
71+ DarkGray = 8;
72+ LightBlue = 9;
73+ LightGreen = 10;
74+ LightCyan = 11;
75+ LightRed = 12;
76+ LightMagenta = 13;
77+ Yellow = 14;
78+ White = 15;
79+ Blink = 128;
80+```
81+
82+---
83+*From the Free Pascal wiki, page "crt unit", as the Internet Archive kept it on 2025-04-25, last changed on 2019-12-27. 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