1             \\aeeTURBO55D.DFV                                                        POSTSCR f@ c^\  `TGM-LIT-025: PCCTGM-1992/01/17-fi: WORD55/POSTSCRIPT: TURBO55.TXT TURBO55D.DFV
TURBO-PASCAL-5.5e 
Index 
Help on Help Editor Command-line options Compiler directives Debugging Hot keys Error messages Installation (TINST) Library functions Library procedures Menu commands Reserved words Units 
Help on Help 
F1	Wherever you are, this displays a context-related Help screen. Once you're in Help, pressing F1 again pops up the Help Index. 
Ctrl-F1	From the editor, displays Language Help based on the cursor's position. 
Alt-F1	Pages backward through the last 20 help screens. Cut&Paste From Help screen, press C to activate the cursor, B to begin marking the block, and Enter to paste it into the editor. Ctrl-K V moves the block; Ctrl-K H hides the highlighting. PgUp/PgDn Allows you to page through a help topic. Arrows Moves the highlight bar to a  keyword (if any are visible). Enter Displays help screen for selection (if highlight bar is present). 
Help Index. When the help system is active, press F1 to see an index of the most important help topics. Ctrl-F1, the language help command, is actually an edit command and can be changed using TINST. To get langauge help for any identifier in the run-time library, place the cursor on the identifier and press Ctrl-F1. When PgDn or PgUp is visible in the lower right corner of the help window, it means there's a group of related help screens you can page through. Use the arrow keys to move the selection bar to any of the highlighted items. The Home key takes you to the first item on the screen; End takes you to the last item. The bottom line gives you help on how to move around in the help system. Press F1 now to see the help index. 
Editor 
Cursor Movement Commands 
Character left	Ctrl-S or Left arrow 
Character right	Ctrl-D or Right arrow 
Word left	Ctrl-A or Ctrl-Left arrow 
Word right	Ctrl-F or Ctrl-Right arrow 
Line up	Ctrl-E or Up arrow 
Line down	Ctrl-X or Down arrow 
Scroll up	Ctrl-W 
Scroll down	Ctrl-Z 
Page up	Ctrl-R or PgUp 
Page down	Ctrl-C or PgDn 
Last position	Ctrl-Q P 
Insert & Delete Commands 
Insert mode on/off	Ctrl-V or Ins 
Insert line	Ctrl-N 
Insert options	Ctrl-O O 
Delete line	Ctrl-Y 
Delete to end of line	Ctrl-Q Y 
Delete character left	Ctrl-H or Backspace 
Delete character	Ctrl-G or Del 
Delete word right	Ctrl-T 
Delete block	Ctrl-K Y 
Block Commands 
Mark block begin	Ctrl-K B 
Mark block end	Ctrl-K K 
Mark single word	Ctrl-K T 
Copy block	Ctrl-K C 
Move block	Ctrl-K V 
Delete block	Ctrl-K Y 
Read block from disk	Ctrl-K R 
Write block to disk	Ctrl-K W 
Hide/display block	Ctrl-K H 
Print block	Ctrl-K P 
Indent block	Ctrl-K I 
Unindent block	Ctrl-K U 
Miscellaneous Commands 
Exit editor, no save	Ctrl-K D or Ctrl-K Q 
Save and edit	Ctrl-K S or F2 
Load new file	F3 
Tab	Ctrl-I or Tab 
Tab mode	Ctrl-O T or Ctrl-Q T 
Fill mode	Ctrl-O F 
Autoindent on/off	Ctrl-O I or Ctrl-Q I 
Unindent mode	Ctrl-O U 
Restore line	Ctrl-Q L 
Set place marker	Ctrl-K n 
Find place marker	Ctrl-Q n 
Pair matching right	Ctrl-Q [ 
Pair matching left	Ctrl-Q ] 
Control character prefix	Ctrl-P 
Abort operation	Ctrl-U 
Restore error message	Ctrl-Q W 
Find	Ctrl-Q F 
Find & replace	Ctrl-Q A 
Repeat last find	Ctrl-L 
Search Options 
B	Searches backward 
G	Searches globally 
L	Searches locally 
n	n = any number; searches n times 
N	Replaces without asking 
U	Ignores uppercase/lowercase 
W	Searches for whole words only 
The Edit command invokes the built-in screen editor. From the editor, you can invoke the main menu by pressing F10 (or Alt and the first letter of the main menu command you desire). Your source text remains displayed on the screen; you need only press Esc or E at the main menu (or Alt-E anywhere) to return to it. In the editor, Ctrl-F1 brings up help on the item on which the cursor is positioned; Ctrl-O O pastes all the current compiler directives into the top of the file currently being edited. Alt-F6 swaps between the two most recently loaded files. If you're at all familiar with SideKick's Notepad, this editor should be a breeze. Press E (or Alt-E from anywhere) to get into the Edit window and enter your code. To end a line, simply press the Enter key. To exit from the editor, press F10 or the Alt key followed by the highlighted capital letter of any one of the main menu items. The editor's status line indicates which line and column number contain the cursor, whether you're in Insert or Overwrite mode, and whether the auto-indent and tab features are on, and the name and extension of the file being edited. 
The maximum editor line width is 249 characters; you'll get a beep if you try to type past that. However, the compiler will only recognize up to 126 columns. The Edit window is 77 columns wide. If you type past column 77, the text you've already entered moves to the left as you type. After you finish writing or editing your file, press F10 to get back to the main menu. Your file will still be displayed onscreen, but you won't be able to do anything to it until you press E to return to the editor. 
There is no help available for this item. Be sure you have the cursor correctly positioned on the item you want help on. If you want info on a particular function, procedure, or unit, you can search through one of the following indices:  procedures, functions, units, reserved words. 
Command Line Options 
/C causes a configuration file to be loaded. Enter the TURBO command, followed by /C and the configuration file name, with no space between the two: 
   TURBO /CMYCONFIG.TP 
You may prevent a configuration file from being loaded by giving a non existent file name: 
   TURBO /Cxxx 
/B causes Turbo Pascal to recompile and link all the files in your program, print the compiler messages to the standard output device, and then return to DOS. This switch allows you to invoke the IDE from a batch file, so you can automate project builds. Before the build, Turbo Pascal will load either a default configuration file or one given specially with the /C switch. Turbo Pascal determines what .EXE to build based on the primary file or the file currently loaded into the editor, in that order of precedence. 
Enter the TURBO command with either /B alone or /C and the configuration file name followed by /B. 
    TURBO /CMYCONFIG.TP /B 
    TURBO /B 
Unless the loaded configuration file has a primary file, you can specify the name of a program to be compiled and linked on the command line. Type in the program name after the TURBO command, followed by /B. 
  TURBO MYFIRST /B 
/M lets you do a make rather than a build (that is, only outdated source files in your project are recompiled and linked). Follow the instructions for the /B switch, but use /M instead. 
/D causes Turbo Pascal to work in dual monitor mode if it detects appropriate hardware. Otherwise, the /D switch is ignored. Dual monitor mode is used when you are running or debugging a program, or shelling to DOS (File/OS shell). 
If your system has two monitors, DOS treats one monitor as the active monitor. Use the DOS MODE command to switch between the two monitors (MODE CO80, for example, or MODE MONO). 
In dual monitor mode, the normal IDE screen will appear on the inactive monitor, and program output will go to the active monitor. Thus, when you type TURBO /D at the DOS prompt on one monitor, Turbo Pascal will come up on the other monitor. When you want to test your program on a particular monitor, you must exit the IDE, switch the active monitor to the one you want to test with, then issue the TURBO /D command again. Program output will then go to the monitor where you typed the TURBO command. Warning: Do not change the active monitor (by using the DOS MODE command, for example) while you are in a DOS shell (File/OS shell). User programs that directly access ports on the inactive monitor's video card are not supported, and can cause unpredictable results. 
When you run or debug programs that make use of dual monitors, do not use the dual monitor switch (/D). 
Note: The Run/User screen command, which normally displays the program output screen, has no effect in dual monitor mode. 
/P controls palette-swapping on EGA video adapters. Use this switch only when the user program modifies the EGA palette registers. When /P is specified, the EGA palette is restored each time the screen is swapped. You generally don't need to use this switch unless your program modifies the EGA palette registers or your program uses BGI to change the palette 
Compiler directives 
Compiler directives are comments that have a special syntax, and can be used wherever comments are allowed. Compiler directives begin with a $ (after an opening delimiter), followed by the name of a specific directive. Switch directives turn compiler features on or off by specifying + or - after the directive name. Parameter directives specify parameters that affect the compilation. 
Switch directives 
Switch directives are local or global. Local directives affect only part of the compilation; global directives affect it entirely. Local directives can appear anywhere in a program or unit. Global directives must appear before the declaration part of the program or unit being compiled. You can group multiple directives by separating them with commas. Here are the directives you can choose from: 
$A  $B  $D  $E  $F  $I 
$L  $N  $O  $R  $S  $V 
Align Data Switch 
Syntax:	{$A+} or {$A-} 
Default:	{$A+} 
Type:	Global 
Menu equivalent:	O/C/Align data 
Switches between byteand word-alignment of variables and typed constants. Word-alignment has no effect on the 8088 CPU. However, on all 80x86 CPUs, wordalignment means faster execution, since word-sized items on even addresses are accessed in one memory cycle, in comparison to two memory cycles for words on odd addresses. In the {$A+} state, all variables and typed constants larger than 1 byte are aligned on a machine-word boundary (an even-numbered address). 
If required, unused bytes are inserted between variables to achieve word-alignment. The {$A+} directive does not affect bytesized variables; neither does it affect fields of record structures and elements of arrays. A field in a record will align on word boundary only if the total size of all fields before it is even. Likewise, for every element of an array to align on a word boundary, the size of the elements must be even. 
In the {$A-} state, no alignment measures are taken. Variables and typed constants are simply placed at the next available address, regardless of their size. Note: Regardless of the state of $A, each global var and const declaration section always starts at a word boundary. Likewise, the compiler always attempts to keep the stack pointer (SP) word-aligned, by allocating an extra unused byte in a procedure's stack frame if required. The command-line compiler equivalent is the /$A option. 
Boolean Evaluation Switch 
Syntax:	{$B+} or {$B-} 
Default:	{$B-} 
Type:	Local 
Menu equivalent:	O/C/Boolean evaluation 
Boolean evaluation switches between the two different models of code generation for the "and" and "or" Boolean operators. In the {$B+} state, the compiler generates code for complete Boolean expression evaluation. This means that every operand of a Boolean expression, built from the "and" and "or" operators, is guaranteed to be evaluated, even when the result of the entire expression is already known. In the {$B-} state, the compiler generates code for short-circuit Boolean expression evaluation, which means that evaluation stops as soon as the result of the entire expression becomes evident. 
Debug Information Switch 
Syntax:	{$D+} or {$D-} 
Default:	{$D+} 
Type:	Global 
Menu equivalent:	O/C/Debug information 
Debug information enables or disables the generation of debug information. This information consists of a line-number table for each procedure, which maps object code addresses into source text line numbers. When Debug information is turned on for a given program or unit, Turbo Pascal's integrated debugger allows you to singlestep and set breakpoints in that module. Furthermore, when a run-time error occurs in a program or unit compiled with {$D+}, Turbo Pascal can automatically take you to the statement that caused the error with C/Find Error. The Debug/Standalone debugging and O/L/Map File switches produce complete information for a given module only if you've compiled that module in the {$D+} state. For units, the debug information is recorded in the .TPU file along with the unit's object code. Debug information increases the size of .TPU files, and takes up additional room when compiling programs that use the unit, but it does not affect the size or speed of the executable program. The debug information switch is usually used in conjunction with the Local symbols switch, which enables and disables the generation of local symbol information for debugging. Note: If you want to use Turbo Debugger to debug your program, set C/Destination to Disk and Debug/Standalone debugging to On. 
Emulation Switch 
Syntax:	{$E+} or {$E-} 
Default:	{$E+} 
Type:	Global 
Menu equivalent:	O/C/Emulation 
Emulation enables or disables linking with a run-time library that will emulate the 8087 numeric coprocessor if it is not present.  When you compile a program in the {$N+,E+} state, Turbo Pascal links with the full 8087 emulator. The resulting .EXE file can be used on any machine, regardless of whether an 8087 is present. If one is found, Turbo Pascal will use it; otherwise, the run-time library emulates it. In the {$N+,E-} state, Turbo Pascal links with a substantially smaller floating-point library, which can only be used if an 8087 is present.  The 8087 emulation switch has no effect if used in a unit; it applies only to the compilation of a program. Furthermore, if the program is compiled in the {$N-} state, and if all the units used by the program were compiled with {$N-}, then an 8087 runtime library is not required, and the 8087 emulation switch is ignored. 
Force FAR Calls Switch 
Syntax:	{$F+} or {$F-} 
Default:	{$F-} 
Type:	Local 
Menu equivalent:	O/C/Force far calls 
Force far calls controls which call model to use for subsequently compiled procedures and functions. Procedures and functions compiled in the {$F+} state always use the FAR call model. In the {$F-} state, Turbo Pascal automatically selects the appropriate model: FAR if the procedure or function is declared in the interface section of a unit; NEAR otherwise. Note: For programs that use overlays, we suggest that you place a {$F+} directive at the beginning of the program and each unit, in order to satisfy the FAR call requirement. For programs that use procedural variables, all such procedures must use the FAR code model. 
Input/Output-Checking Switch 
Syntax:	{$I+} or {$I-} 
Default:	{$I+} 
Type:	Local 
Menu equivalent:	O/C/I/O-checking 
See also:	{$I filename} parameter directive for Include files 
I/O-checking enables or disables the automatic code generation that checks the result of a call to an I/O procedure. If an I/O procedure returns a nonzero I/O result when this switch is on, the program terminates, displaying a run-time error message. When this switch is off, you must check for I/O errors by using the IOResult function. 
Local Symbol Information Switch 
Syntax:	{$L+} or {$L-} 
Default:	{$L+} 
Type:	Global 
Menu equivalent:	O/C/Local symbols 
See also:	{$L filename} parameter directive for linking object files 
Local symbols enables or disables the generation of local symbol information. Local symbol information consists of the names and types of all local variables and constants in a module, that is, the symbols in the module's implementation part, and the symbols within the module's procedures and functions. When local symbols are on for a given program or unit, Turbo Pascal's integrated debugger allows you to examine and modify the module's local variables. Furthermore, calls to the module's procedures and functions can be examined via the Debug/ Call stack menu. The O/L/Map file and Debug/Standalone Debugging switches produce local symbol information for a given module only if that module was compiled in the {$L+} state. For units, the local symbol information is recorded in the .TPU file along with the unit's object code. Local symbol information increases the size of .TPU files, and takes up additional room when compiling programs that use the unit, but it does not affect the size or speed of the executable program.  The Local Symbol information switch is usually used in conjunction with the Debug Information switch, which enables and disables the generation of line-number tables for debugging. Note that the $L directive is ignored if Debug information is set to Off {$D-}. 
Numeric Processing Switch 
Syntax:	{$N+} or {$N-} 
Default:	{$N-} 
Type:	Global 
Menu equivalent:	O/C/Numeric processing 
Numeric processing switches between the two different models of floating-point code generation supported by Turbo Pascal. In the {$N-} state, code is generated to perform all real-type calculations in software by calling run-time library routines. In the {$N+} state, code is generated to perform all real-type calculations using the 8087 numeric coprocessor. Note that you can also use the {$E+} directive to emulate the 8087. This gives you access to the IEEE floating-point types without requiring that you install an 8087 chip. 
Overlay Code Generation Switch 
Syntax:	{$O+} or {$O-} 
Default:	{$O-} 
Type:	Global 
Menu equivalent:	O/C/Overlays allowed 
See also:	{$O unitname} parameter directive for overlay unit names 
The $O directive enables or disables overlay code generation. Turbo Pascal allows a unit to be overlaid only if it was compiled with {$O+}. In this state, the code generator takes special precautions when passing string and set constant parameters from one overlaid procedure or function to another. The use of {$O+} in a unit does not force you to overlay that unit. It just instructs Turbo Pascal to ensure that the unit can be overlaid if so desired. If you develop units that you plan to use in overlaid as well as non-overlaid applications, then compiling them with {$O+} ensures that you can indeed do both with just one version of the unit. Note: A {$O+} compiler directive is almost always used in conjunction with a {$F+} directive to satisfy the overlay manager's FAR call requirement. 
Range-Checking Switch 
Syntax:	{$R+} or {$R-} 
Default:	{$R-} 
Type:	Local 
Menu equivalent:	O/C/Range-checking 
Range-checking enables or disables the generation of range-checking code. In the {$R+} state, all array and stringindexing expressions are verified as being within the defined bounds, and all assignments to scalar and subrange variables are checked to be within range. If a range-check fails, the program terminates and displays a run-time error message. Enabling rangechecking slows down your program and makes it larger. Use this option when debugging, then turn it off once the program is bugfree. 
Stack-Overflow Checking Switch 
Syntax:	{$S+} or {$S-} 
Default:	{$S+} 
Type:	Local 
Menu equivalent:	O/C/Stack-checking 
Stack-checking enables or disables the generation of stack-overflow checking code. In the {$S+} state, the compiler generates code at the beginning of each procedure or function that checks whether there is sufficient stack space for the local variables and other temporary storage. When there is not enough stack space, a call to a procedure or function compiled with {$S+} causes the program to terminate and display a run-time error message. In the {$S-} state, such a call is most likely to cause a system crash. 
Var-String Checking Switch 
Syntax:	{$V+} or {$V-} 
Default:	{$V+} 
Type:	Local 
Menu equivalent:	O/C/Var-string checking 
Var-string checking controls type-checking on strings passed as variable parameters. In the {$V+} state, strict type-checking is performed, requiring the formal and actual parameters to be of identical string types. In the {$V-} state, any string type variable is allowed as an actual parameter, even if the declared maximum length is not the same as that of the formal parameter. 
Parameter Directives 
Parameter directives must have at least one blank space between the directive name and the parameters; for example, 
   {$I TYPES.INC} 
Here are the parameter directives you have to choose from: 
   $I filename 
   $L filename 
   $M stacksize,heapmin, heapmax} 
   $O unitname 
Include File Directive 
Syntax:	{$I filename} 
Type:	Local 
Menu equivalent:	O/D/Include Directories 
See also:	{$I} switch directive for input/output checking 
Include file directive instructs the compiler to include the named file in the compilation. In effect, the file is inserted in the compiled text right after the {$I filename} directive. The default extension for filename is .PAS. If filename does not specify a directory, then, in addition to searching for the file in the current directory, Turbo Pascal searches in the directories specified in the O/D/Include Directories menu (or in the directories specified in the /I option on the TPC command line). You can nest Include files up to 15 levels deep. There is one restriction to the use of Include files: An Include file cannot be specified in the middle of a statement part. In fact, all statements between the "begin" and "end" of a statement part must reside in the same source file. 
Link Object File Directive 
Syntax:	{$L filename} 
Type:	Local 
Menu equivalent:	O/D/Object Directories 
See also:	{$L} switch directive for local symbol information 
Link object file directive instructs the compiler to link the named file with the program or unit being compiled. The $L directive is used to link with code written in assembly language for subprograms declared to be external. The named file must be an Intel relocatable object file (.OBJ file). The default extension for filename is .OBJ. If filename does not specify a directory, then, in addition to searching for the file in the current directory, Turbo Pascal searches in the directories specified in the O/D/Object Directories menu (or in the directories specified in the /O option on the TPC command line). 
Memory Allocation Sizes Directive 
Syntax:	{$M stacksize,heapmin,heapmax} 
Default:	{$M 16384,0,655360} 
Type:	Global 
Menu equivalent:	O/C/Memory sizes 
Memory sizes specifies a program's memory allocation parameters. stacksize must be an integer number in the range 1024 to 65520, which specifies the size of the stack segment. heapmin must be in the range 0 to 655360, and heapmax must be in the range heapmin to 655360. heapmin and heapmax specify the minimum and maximum sizes of the heap, respectively. Note: The $M directive has no effect when used in a unit. 
Overlay Unit Name Directive 
Syntax:	{$O unitname} 
Type:	Local 
Menu equivalent:	none 
See also:	{$O} switch directive for overlay code generation 
Overlay Unit Name turns a unit into an overlay. The {$O unitname} directive has no effect if used in a unit; when compiling a program, it specifies which of the units used by the program should be placed in an .OVR file instead of in the .EXE file. {$O unitname} directives must be placed after the program's uses clause. Turbo Pascal reports an error if you attempt to overlay a unit that wasn't compiled in the {$O+} state. Any unit named in a {$O unitname} directive must have been compiled with Overlays allowed set to On in the IDE (the equivalent of the {$O+} compiler directive). 
Debugging 
Turbo Pascal's integrated debugger is a source-level debugger: You follow the execution of the program and set breakpoints with the Edit window display of the Pascal source file. You examine and modify variables using Pascal variable names and Pascal syntax. To use the debugger, set the Integrated Debugging option to On in the Debug menu. Compile and link the program with Compile menu commands. When you run the program with the Run command on the Run menu, the debugger takes over. You can get to the debugger commands via one of the following: 
      Debug menu 
      Break/watch menu 
      Run menu 
      Hot keys 
The debugger uses the Edit window to show where execution has been halted and to show breakpoints. If watch expressions have been defined, a Watch window below the Edit window shows the values of those expressions. The pull-down menu system is available while the debugger is in use. Editing changes can be made to the source file in the Edit window and the program can be recompiled with the regular Compile menu commands. 
Hot keys 
Turbo Pascal has a number of hot keys you can use no matter where you are. Two of the most common ones are probably F10, which toggles between the menus and the active window, and Alt-X, which exits you to DOS. 
Key	Function 
F1	Takes you to context-sensitive  help 
F2	Saves the file currently in the  editor 
F3	Lets you load a new file 
F4	Executes to the cursor location 
F5	Zooms and unzooms active window 
F6	Switches the active window 
F7	traces into subroutines 
F8	Steps over subroutine calls 
F9	Performs a Make 
F10	Toggles between menus and active window 
Alt-F1	Brings up the last Help  screen referenced 
Alt-F3	Lets you pick a file to load 
Alt-F5	Takes you to the User screen 
Alt-F6	Switches the contents of the  active window 
Alt-F9	Compiles your program 
Alt-B	Takes you to Break/watch menu 
Alt-C	Takes you to the Compile menu 
Alt-D	Takes you to the Debug menu 
Alt-E	Puts you in the editor 
Alt-F	Takes you to the File menu 
Alt-O	Takes you to the Options menu 
Alt-R	Takes you to the Run menu 
Alt-X	Exits you to DOS 
Ctrl-F1	Brings up help on keywords in  your source using the cursor. 
Ctrl-F2	Terminates a debug session 
Ctrl-F3	Displays call stack when  debugging 
Ctrl-F4	Evaluates or modifies  variable 
Ctrl-F7	Adds an expression to the  Watch window 
Ctrl-F8	Toggles breakpoint 
Ctrl-F9	Runs your program 
Shift-F10	Displays version information 
Compiler error messages 
When a compiler error occurs and you're in the integrated environment, you're placed in the editor at the point of error. In the command-line compiler, the error message and number and source line are displayed, and a caret (^) indicates where the error occurred. Run-time error messages: If you experience an error at run-time, your program will terminate and this message will be displayed: 
     Run-time error <nnn> at <xxxx:yyyy> 
where nnn is the run-time error number, and xxxx:yyyy is the run-time error address. 
TINST 
TINST: You have the option of changing many of Turbo Pascal's default modes of operation by running the custom installation program, TINST. Running this program directly modifies certain default values within your copy of TURBO.EXE. TINST lets you specify default file names; set up paths to directories; choose default settings for the integrated debugger; customize the editor command keys; set up the default video display; change screen colors; set up Turbo Pascal's editor defaults; resize the Edit and Message windows. 
Library functions 
Abs 
Addr 
ArcTan 
Chr 
Concat 
Copy 
Cos 
CSeg 
DiskFree 
DiskSize 
DosExitCode 
DosVersion 
DSeg 
EnvCount 
EnvStr 
Eof (typed) 
Eof (text) 
Eoln 
Exp 
FExpand 
FilePos 
FileSize 
Frac 
FSearch 
GetBkColor 
GetColor 
GetDefaultPalette 
GetDriverName 
GetEnv 
GetGraphMode 
GetMaxMode 
GetMaxX 
GetMaxY 
GetModeName 
GetPaletteSize 
GetPixel 
GetX 
GetY 
GraphErrorMsg 
GraphResult 
Hi 
ImageSize 
InstallUserDriver 
InstallUserFont 
Int 
IOResult 
KeyPressed 
Length 
Lo 
MaxAvail 
MemAvail 
MsDos 
Odd 
Ofs 
Ord 
OvrGetBuf 
OvrGetRetry 
ParamCount 
ParamStr 
Pi 
Pos 
Pred 
Ptr 
Random 
ReadKey 
Round 
SeekEof 
SeekEoln 
Seg 
SetAspectRatio 
Sin 
SizeOf 
Sound 
SPtr 
Sqr 
Sqrt 
SSeg 
Succ 
Swap 
TextHeight 
TextWidth 
Trunc 
TypeOf 
UpCase 
WhereX 
WhereY 
Library procedures 
Append 
Arc 
Assign 
AssignCrt 
Bar3D 
Bar 
BlockRead 
BlockWrite 
ChDir 
Circle 
ClearDevice 
ClearViewPort 
Close 
CloseGraph 
ClrEol 
ClrScr 
Dec 
Delay 
Delete 
DelLine 
DetectGraph 
Dispose 
Ellipse 
Erase 
Exec 
Exit 
Fail 
FillChar 
FillEllipse 
FillPoly 
FindFirst 
FindNext 
FloodFill 
Flush 
FreeMem 
FSplit 
GetArcCoords 
GetAspectRatio 
GetCBreak 
GetDate 
GetDir 
GetFAttr 
GetFillSettings 
GetFTime 
GetImage 
GetIntVec 
GetLineSettings 
GetMem 
GetPalette 
GetTextSettings 
GetTime 
GetVerify 
GetViewSettings 
GotoXY 
Halt 
HighVideo 
Inc 
InitGraph 
Insert 
InsLine 
Intr 
Keep 
Line 
LineRel 
LineTo 
LowVideo 
Mark 
MkDir 
Move 
MoveTo 
New 
NormVideo 
NoSound 
OutText 
OutTextXY 
OvrClrBuf 
OvrInit 
OvrInitEMS 
OvrSetBuf 
OvrSetRetry 
PackTime 
PieSlice 
PutImage 
PutPixel 
Randomize 
Read (typed) 
Read (text) 
ReadLn 
Rectangle 
Release 
Rename 
Reset 
RestoreCrtMode 
Rewrite 
RmDir 
RunError 
Sector 
Seek 
SetActivePage 
SetAllPalette 
SetAspectRatio 
SetBkColor 
SetCBreak 
SetColor 
SetDate 
SetFAttr 
SetFillPattern 
SetFillStyle 
SetFTime 
SetGraphMode 
SetIntVec 
SetLineStyle 
SetPalette 
SetRGBPalette 
SetTextBuf 
SetTextJustify 
SetTextStyle 
SetTime 
SetUserCharSize 
SetVerify 
SetViewPort 
SetVisualPage 
SetWriteMode 
Str 
SwapVectors 
TextBackground 
TextColor 
TextMode 
Truncate 
UnPackTime 
Val 
Window 
Write (typed) 
Write (text) 
WriteLn 
Menu commands 
The Turbo Pascal menu system is both logical and intuitive. F10 toggles you back and forth between the main menu and the editor. Or you can press an Alt key and the first letter of the main menu item you'd like to get to; for example, Alt-O will get you to the Options menu. Once at the main menu, you can select an item by pressing the key corresponding to the first letter of the menu name: 
File, Edit, Run, Compile, Options, Debug, Break. 
You'll find that there are both pull-down and pop-up menus off of the main menus (except for the Edit command), offering you many programming options. To select any items from the pull-down menus of the main menu entries, you can use the Up arrow and Down arrow keys on your keyboard to move the highlight bar, pressing Enter when the bar is on the command you want. To exit from a menu, just press Esc. Whether you're in one of the windows or one of the menus, the line at the bottom of the screen provides at-a-glance function-key help for your current position. 
Turbo Pascal Reserved Words 
absolute 
and 
array 
begin 
case 
const 
constructor 
destructor 
div 
do 
downto 
else 
end 
external 
file 
for 
forward 
function 
goto 
if 
implementation 
in 
inline 
interface 
interrupt 
label 
mod 
nil 
not 
object 
of 
or 
packed 
procedure 
program 
record 
repeat 
set 
shl 
shr 
string 
then 
to 
type 
unit 
until 
uses 
var 
virtual 
while 
with 
xor 
Units 
A unit is a collection of constants, data types, variables, procedures, and functions. Each one is compiled separately, and each can be used in your program. Turbo Pascal provides eight predefined units (Turbo3, Graph3, and Graph are the only ones not stored in TURBO.TPL): System, Printer, Turbo3, Graph, Graph3, Dos, Crt, Overlay. 
System 
The System unit is Turbo Pascal's run-time library. It implements low-level, run-time support routines for all built-in features, such as file I/O, string-handling, floating point, and dynamic memory allocation. System is used automatically by any unit or program, and need never be referred to in a uses clause. Here are all the procedures and functions within the System unit: 

Abs 
Addr 
Append 
ArcTan 
Assign 
BlockRead 
BlockWrite 
ChDir 
Chr 
Close 
Concat 
Copy 
Cos 
CSeg 
Dec 
Delete 
Dispose 
DSeg 
Eof (typed) 
Eof (text) 
Eoln 
Erase 
Exit 
Exp 
FilePos 
FileSize 
FillChar 
Flush 
Frac 
FreeMem 
GetDir 
GetMem 
Halt 
Hi 
Inc 
Insert 
Int 
IOResult 
Length 
Ln 
Lo 
Mark 
MaxAvail 
MemAvail 
MkDir 
Move 
New 
Odd 
Ofs 
Ord 
ParamCount 
ParamStr 
Pi 
Pos 
Pred 
Ptr 
Random 
Randomize 
Read (typed) 
Read (text) 
ReadLn 
Release 
Rename 
Reset 
Rewrite 
RmDir 
Round 
RunError 
Seek 
SeekEof 
SeekEoln 
Seg 
SetTextBuf 
Sin 
SizeOf 
SPtr 
Sqr 
Sqrt 
SSeg 
Str 
Succ 
Swap 
Trunc 
Truncate 
UpCase 
Val 
Write (typed) 
Write (text) 
WriteLn 

Here are all the System unit variables and typed constants: 
var   Input: Text;         {Input standard file}   Output: Text;       {Output standard file} const   PrefixSeg: Word = 0;  {Program seg prefix}   HeapOrg: pointer = nil;      {Heap origin}   HeapPtr: pointer = nil;     {Heap pointer}   StackLimit: Word = 0;      {Min stack ptr}   FreePtr: pointer = nil;{Free list pointer}   FreeMin: Word = 0;    {Min free list size} const   InOutRes: Integer = 0;        {I/O result}   HeapError: pointer = nil;{Heap error func}   ExitProc: pointer = nil;  {Exit procedure}   ExitCode: Integer = 0;         {Exit code}   ErrorAddr: pointer = nil;{Runtime err adr}   RandSeed: Longint;           {Random seed}   FileMode: Byte = 2;       {File open mode}   Test8087: Byte = 0;  {Result of 8087 test} 
The following typed constants are used by the Turbo Pascal overlay manager: 
const   OvrCodeList: Word = 0; {Code segment list}   OvrHeapSize: Word = 0;  {Initial buf size}   OvrDebugPtr: pointer = nil;   {Debug hook}   OvrHeapOrg: Word = 0;    {Ovly buf origin}   OvrHeapPtr: Word = 0;   {Ovly buf pointer}   OvrHeapEnd: Word = 0;       {Ovly buf end}   OvrLoadList: Word = 0;  {Loaded ovly list}   OvrDosHandle: Word = 0; {Ovly file handle}   OvrEMSHandle: Word = 0;  {Ovly EMS handle} 
The following variables are all of the type pointer, and save the original values of interrupt vectors that Turbo Pascal changes. Their names are of the form SaveIntXX, where XX is the interrupt number in hex: 
  SaveInt00,SaveInt02,SaveInt1B,SaveInt23,   SaveInt24,SaveInt34,SaveInt35,SaveInt36,   SaveInt37,SaveInt38,SaveInt39,SaveInt3A,   SaveInt3B,SaveInt3C,SaveInt3D,SaveInt3E,   SaveInt3F,SaveInt75: pointer; 
Printer unit 
The Printer unit is a very small unit designed to make life easier when you're using your printer from within a program. Printer declares a text file called Lst, and associates it with the LPT1 device. Using Printer saves you the trouble of declaring, assigning, opening, and closing a text file yourself. Here is the Printer variable: 
var   Lst : text; 
Turbo3 unit 
Every routine in the Turbo3 unit is duplicated or improved upon in other standard units. The Turbo3 unit is provided for backward compatibility only. By using Turbo3, you gain more 3.0-compatibility, but lose direct access to important new features built into some of the standard routines duplicated here. (Note that you can still call these standard routines by using the unit override syntax; for example, Turbo3's MemAvail calls the System.MemAvail function even if you are using the Turbo3 unit in your program. 
Kbd is provided for 3.0 programs that read from the keyboard device; for example, Read(Kbd, CharVar). Note that there is now a function in the Crt unit called ReadKey that should be used in place of Read(Kbd, CharVar). Cbreak has been renamed to CheckBreak in version 4. Backward compatibility is achieved by giving Cbreak the same address as CheckBreak, which is declared in the Crt unit. The statement Cbreak := False turns off Control-Break checking; Cbreak := True turns it back on. 
MemAvail function	Returns the number of free paragraphs of heap storage available. MaxAvail function	Returns the size of the largest contiguous free block in the heap (in paragraphs). 
LongFileSize function	Returns the size of the file. The value returned is a real number. 
LongFilePos function	Returns the current file position of a file. The value returned is a real number. 
LongSeek procedure	Moves the current position of a file to a specified component. Uses a real number parameter to specify the component number. 
HighVideo procedure	sets the video attribute to yellow on black (color systems) or white on black (black and white, mono systems). 
NormVideo procedure	same as HighVideo. Sets the video attribute to yellow on black (color systems) or white on black (black and white, mono systems). 
LowVideo procedure	sets the video attribute to LightGray on black. 
IOResult function	returns an integer value that is the status of the last I/O operation performed. The Turbo3 IOResult function returns 3.0-compatible return codes wherever possible. 
Graph unit 
The Graph unit implements a complete library of more than 50 graphics routines that range from high-level calls, like SetViewPort, Circle, Bar3D, and DrawPoly, to bit-oriented routines, like GetImage and PutImage. Several fill and line styles are supported, and there are several fonts that may be magnified, justified, and oriented horizontally or vertically. To compile a program that uses the Graph unit, you don't need any external files. (Of course, you'll need your program's source code, the compiler, and access to the standard units in TURBO.TPL). 
To run a program that uses the Graph unit, in addition to your .EXE program, you'll need one or more of the graphics drivers (.BGI files). In addition, if your program uses any stroked fonts, you'll need one or more font (.CHR) files as well. Here are the functions and procedures that make up the Graph unit: 

Arc 
Bar 
Bar3D 
Circle 
ClearDevice 
ClearViewPort 
CloseGraph 
DetectGraph 
Drawpoly 
Ellipse 
FillEllipse 
FillPoly 
FloodFill 
GetArcCoords 
GetAspectRatio 
GetBkColor 
GetColor 
GetDefaultPalette 
GetDriverName 
GetFillPattern 
GetFillSettings 
GetGraphMode 
GetImage 
GetLineSettings 
GetMaxMode 
GetMaxColor 
GetMaxX 
GetMaxY 
GetModeName 
GetModeRange 
GetPalette 
GetPaletteSize 
GetPixel 
GetTextSettings 
GetViewSettings 
GetX 
GetY 
GraphDefaults 
GraphErrorMsg 
GraphResult 
ImageSize 
InitGraph 
InstallUserDriver 
InstallUserFont 
Line 
LineRel 
LineTo 
MoveRel 
MoveTo 
OutText 
OutTextXY 
PieSlice 
PutImage 
PutPixel 
Rectangle 
RegisterBGIdriver 
RegisterBGIfont 
RestoreCrtMode 
Sector 
SetActivePage 
SetAllPalette 
SetAspectRatio 
SetBkColor 
SetColor 
SetFillPattern 
SetFillStyle 
SetGraphBufSize 
SetGraphMode 
SetLineStyle 
SetPalette 
SetRGBPalette 
SetTextJustify 
SetTextStyle 
SetUserCharSize 
SetViewPort 
SetVisualPage 
SetWriteMode 
TextHeight 
TextWidth 

There are many useful constant and type declarations in the Graph unit. Here's an excerpt from the interface section of GRAPH.TPU for your reference: 
const   { GraphResult error return codes: }   grOk             =   0;   grNoInitGraph    =  -1;   grNotDetected    =  -2;   grFileNotFound   =  -3;   grInvalidDriver  =  -4;   grNoLoadMem      =  -5;   grNoScanMem      =  -6;   grNoFloodMem       =  -7;   grFontNotFound     =  -8;   grNoFontMem        =  -9;   grInvalidMode      = -10;   grError            = -11; {generic error}   grIOError          = -12;   grInvalidFont      = -13;   grInvalidFontNum   = -14; 
  { define graphics drivers }   CurrentDriver = -128; { For GetModeRange }   Detect   = 0; { Requests autodetection }   CGA      = 1;   MCGA     = 2;   EGA      = 3;   EGA64    = 4;   EGAMono  = 5;   IBM8514  = 6;   HercMono = 7;   ATT400   = 8;   VGA      = 9;   PC3270   = 10; 
  { graphics modes for each driver }   CGAC0       = 0;   { 320x200 }   CGAC1       = 1;   { 320x200 }   CGAC2       = 2;   { 320x200 }   CGAC3       = 3;   { 320x200 }   CGAHi       = 4;   { 640x200 }   MCGAC0      = 0;   { 320x200 }   MCGAC1      = 1;   { 320x200 }   MCGAC2      = 2;   { 320x200 }   MCGAC3      = 3;   { 320x200 }   MCGAMed     = 4;   { 640x200 }   MCGAHi      = 5;   { 640x480 }   EGALo       = 0;   { 640x200 }   EGAHi       = 1;   { 640x350 }   EGA64Lo     = 0;   { 640x200 }   EGA64Hi     = 1;   { 640x350 }   EGAMonoHi   = 3;   { 640x350 }   HercMonoHi  = 0;   { 720x348 }   ATT400C0    = 0;   { 320x200 }   ATT400C1    = 1;   { 320x200 }   ATT400C2    = 2;   { 320x200 }   ATT400C3    = 3;   { 320x200 }   ATT400Med   = 4;   { 640x200 }   ATT400Hi    = 5;   { 640x400 }   VGALo       = 0;   { 640x200 }   VGAMed      = 1;   { 640x350 }   VGAHi       = 2;   { 640x480 }   PC3270Hi    = 0;   { 720x350 }   IBM8514Lo   = 0;   { 640x480 }   IBM8514Hi   = 1;   { 1024x768 } 
  { Colors for SetPalette/SetAllPalette: }   Black        = 0;   Blue         = 1;   Green        = 2;   Cyan         = 3;   Red          = 4;   Magenta      = 5;   Brown        = 6;   LightGray    = 7;   DarkGray     = 8;   LightBlue    = 9;   LightGreen   = 10;   LightCyan    = 11;   LightRed     = 12;   LightMagenta = 13;   Yellow       = 14;   White        = 15; 
{ Colors for 8514 to set standard   EGA colors w/o knowing their values }   EGABlack             = 0;  { dark colors }   EGABlue              = 1;   EGAGreen             = 2;   EGACyan              = 3;   EGARed               = 4;   EGAMagenta           = 5;   EGABrown             = 20;   EGALightgray         = 7;   EGADarkgray          = 56;{ light colors }   EGALightblue         = 57;   EGALightgreen        = 58;   EGALightcyan         = 59;   EGALightred          = 60;   EGALightmagenta      = 61;   EGAYellow            = 62;   EGAWhite             = 63;   NormWidth  = 1;   ThickWidth = 3; 
  { Set/GetTextStyle constants: }   DefaultFont   = 0; { 8x8 bit mapped font }   TriplexFont   = 1; { "Stroked" fonts }   SmallFont     = 2;   SansSerifFont = 3;   GothicFont    = 4;   HorizDir     = 0;  { left to right }   VertDir      = 1;  { bottom to top }   UserCharSize = 0;{ Line styles & widths  } 
  { for Get/SetLineStyle: }   SolidLn    = 0;   DottedLn   = 1;   CenterLn   = 2;   DashedLn   = 3;   UserBitLn  = 4; {User-defined line style} 
  { Clipping constants: }   ClipOn  = true;   ClipOff = false; 
  { Bar3D constants: }   TopOn  = true;   TopOff = false; 
  { Fill patterns for Get/SetFillStyle: }   EmptyFill      = 0; { uses background }   SolidFill      = 1; { uses draw color }   LineFill       = 2; { --- }   LtSlashFill    = 3; { /// }   SlashFill      = 4; { /// thick fill }   BkSlashFill    = 5; { \\\ thick fill }   LtBkSlashFill  = 6; { \\\ fill }   HatchFill      = 7; { light hatch fill }   XHatchFill     = 8; { heavy cross hatch }   InterleaveFill = 9; { interleaving line }   WideDotFill    = 10;{ Widely spaced dot }   CloseDotFill   = 11;{ Closely spaced dot }   UserFill       = 12; { user-defined fill } 
  { BitBlt operators for PutImage: }   NormalPut     = 0;    { MOV }   CopyPut       = 0;    { MOV }   XORPut        = 1;    { XOR }   OrPut         = 2;    { OR  }   AndPut        = 3;    { AND }   NotPut        = 4;    { NOT } 
  { Horizontal and vertical           }   { justification for SetTextJustify: }   CenterText = 1;   LeftText   = 0;   RightText  = 2;   BottomText = 0;   TopText    = 2; 
const   MaxColors = 15; type   PaletteType = record       Size   : Byte;       Colors : array[0..MaxColors]                  of Shortint;     end;   LineSettingsType = record       LineStyle : Word;       Pattern   : Word;       Thickness : Word;     end;   TextSettingsType = record       Font      : Word;       Direction : Word;       CharSize  : Word;       Horiz     : Word;       Vert      : Word;     end;   FillSettingsType = record       Pattern : Word;       Color   : Word;     end;   FillPatternType = array [1..8]                       of Byte;   PointType = record       X, Y : integer;     end;   ViewPortType = record       x1, y1, x2, y2 : integer;       Clip           : Boolean;     end;   ArcCoordsType = record       X, Y,       Xstart, Ystart,       Xend, Yend : integer;     end; var   GraphGetMemPtr  : pointer;   GraphFreeMemPtr : pointer; 
Graph3 unit 
The Graph3 unit is a direct implementation of the turtlegraphics driver provided by Turbo Pascal 3.0. Graph3 combines Turbo Pascal 3.0's GRAPH.P and GRAPH.BIN into a single unit, retaining the same functionality. The only modification you need to make to a Turbo Pascal 3.0 program that uses the turtlegraphics driver is to remove the {$I GRAPH.P} compiler directive, replacing it with a reference to Crt and Graph3 in your program's uses clause. 

GraphColorMode procedure	Sets you in 320x200 color graphics mode. 
GraphMode procedure	Sets you in 320x200 black-and-white graphics mode. 
HiRes procedure	Sets screen in 640x200 high-resolution graphics mode. 
Palette procedure	Activates the color palette specified. 
HiResColor procedure	Selects the color used for drawing in high-resolution graphics. 
GraphBackground procedure	Sets background color of screen. 
GraphWindow procedure	Lets you define an area of the screen as the active window in any of the graphics modes. 
Plot procedure	Plots a point at the specified coordinates and in the specified color. 
Draw procedure	Draws a line between the specified endpoints and in the specified color. 
ColorTable procedure	Defines a color translation table that lets the current color of any given point determine the new color of that point when it is redrawn. 
Arc procedure	Draws an arc using the given parameters. 
Circle procedure	Draws a circle. 
GetPic procedure	Copies the contents of an area on the screen into a buffer; the contents can later be restored using PutPic. 
PutPic procedure	Copies the contents of a buffer. 
GetDotColor function	Returns the color value of the dot at the indicated location. 
FillScreen procedure	Fills the entire active window with the indicated color. 
FillShape procedure	Fills an area of any shape with the specified color. 
FillPattern procedure	Fills a rectangular area with the current pattern using the specified color. 
Pattern procedure	Defines an 8x8 pattern to be used by FillPattern. 
Back procedure	(Turtlegraphics) Moves the turtle backward by the given distance. 
Forwd procedure	(Turtlegraphics) Moves the turtle forward by the given distance. 
ClearScreen procedure	(Turtlegraphics) Clears the active window and homes the turtle. 
Heading function	(Turtlegraphics) Returns the current heading of the turtle. 
HideTurtle procedure	(Turtlegraphics) Hides the turtle. 
Home procedure	(Turtlegraphics) Puts the turtle in its home position. 
NoWrap procedure	(Turtlegraphics) Disables "wrapping" for the turtle. 
PenDown procedure	(Turtlegraphics) Puts the turtle's pen "down" so that any movement of the turtle results in drawing. 
PenUp procedure	(Turtlegraphics) Puts the turtle's pen "up" so that the turtle can be moved without drawing. 
SetHeading procedure	(Turtlegraphics) Turns the turtle to the specified angle. 
SetPenColor procedure	(Turtlegraphics) Sets the color used for the turtle's pen. 
SetPosition procedure	(Turtlegraphics) Moves the turtle to the given coordinates without drawing a line. 
ShowTurtle procedure	(Turtlegraphics) Makes the turtle visible. 
TurnLeft procedure	(Turtlegraphics) Turns the turtle's heading to the left (counterclockwise). 
TurnRight procedure	(Turtlegraphics) Turns the turtle's heading to the right (clockwise). 
TurtleWindow procedure	(Turtlegraphics) Defines an area of the screen as the active turtle graphics screen. 
TurtleThere function	(Turtlegraphics) Tests if the turtle is visible and in the active window. 
TurtleDelay procedure	(Turtlegraphics) Sets a delay between each step of the turtle. 
Wrap procedure	(Turtlegraphics) Forces wraparound when the turtle attempts to move past the boundaries of the active window. 
XCor function	(Turtlegraphics) Returns the current X-coordinate of the turtle. 
YCor function	(Turtlegraphics) Returns the current Y-coordinate of the turtle. 
Here's a list of the constants that make up the Graph3 unit: 
const   North = 0;   East  = 90;   South = 180;   West  = 270; 
Dos unit 
The Dos unit supports a number of DOS functions. The following procedures and functions are available: 

DiskFree 
DiskSize 
DosExitCode 
DosVersion 
EnvCount 
EnvStr 
Exec 
FExpand 
FSearch 
FSplit 
FindFirst 
FindNext 
GetCBreak 
GetDate 
GetEnv 
GetFAttr 
GetFTime 
GetIntVec 
GetTime 
GetVerify 
Intr 
Keep 
MsDos 
PackTime 
SetCBreak 
SetDate 
SetFAttr 
SetFTime 
SetIntVec 
SetVerify 
SetTime 
SwapVectors 
UnpackTime 

The following constants test individual flag bits in the Flags register after a call to Intr or MsDos: 
 const    FCarry     = $0001;    FParity    = $0004;    FAuxiliary = $0010;    FZero      = $0040;    FSign      = $0080;    FOverflow  = $0800; 
These constants are used by the filehandling procedures when opening and closing disk files. The mode fields of Turbo Pascal's file variables will contain one of the values specified here: 
 const    fmClosed = $D7B0;    fmInput  = $D7B1;    fmOutput = $D7B2;    fmInOut  = $D7B3; 
The record definitions used internally by Turbo Pascal are also declared in the Dos unit. FileRec is used for both typed and untyped files, while TextRec is the internal format of a variable of type text: type { Typed-file and untyped-file record } 
  FileRec = record              Handle: Word;              Mode: Word;              RecSize: Word;              Private: array[1..26] of Byte;              UserData: array[1..16] of Byte;              Name: array[0..79] of Char;              end;   { Textfile record }   TextBuf = array[0..127] of Char;   TextRec = record              Handle: Word;              Mode: Word;              BufSize: Word;              Private: Word;              BufPos: Word;              BufEnd: Word;              BufPtr: ^TextBuf;              OpenFunc: Pointer;              InOutFunc: Pointer;              FlushFunc: Pointer;              CloseFunc: Pointer;              UserData: array[1..16] of Byte;              Name: array[0..79] of Char;              Buffer: TextBuf;             end; 
The following constants test, set, and clear file attribute bits in connection with the GetFAttr, SetFAttr, FindFirst, and FindNext procedures: 
const   ReadOnly  = $01;   Hidden    = $02;   SysFile   = $04;   VolumeID  = $08;   Directory = $10;   Archive   = $20;   AnyFile   = $3F; 
Intr and MsDos use variables of type Registers to specify the input register contents and examine the output register contents of a software interrupt: 
type   {Registers record used by Intr and MsDos}   Registers = record                 case Integer of                   0: (AX,BX,CX,DX,BP,SI,DI,                       DS,ES,Flags: Word);                   1: (AL,AH,BL,BH,CL,CH,DL,                       DH: Byte);               end; 
Variables of DateTime type are used in connection with the UnpackTime and PackTime procedures to examine and construct 4-byte, packed date-and-time values for the GetFTime, SetFTime, FindFirst, and FindNext procedures: 
type   { Date & time record used by PackTime }   { and UnpackTime }   DateTime = record                Year,Month,Day,Hour,                Min,Sec: Word;              end; 
Variables of type SearchRec are used by the FindFirst and FindNext procedures to scan directories: 
type   { Search record used by FindFirst }   { and FindNext }   SearchRec = record                 Fill: array[1..21] of Byte;                 Attr: Byte;                 Time: Longint;                 Size: Longint;                 Name: string[12];               end; 
The following string types are defined by the Dos unit to handle file names and paths: 
   ComStr  =  string [127];    PathStr =  string [79];    DirStr  =  string [67];    NameStr =  string [8];    ExtStr  =  string [4]; 
The information for each file found by one of these procedures is reported back in a SearchRec. The Attr field contains the file's attributes (constructed from file attribute constants), Time contains its packed date and time (use UnpackTime to unpack), Size contains its size in bytes, and Name contains its name. The Fill field is reserved by DOS and should never be modified. DosError is used by many of the routines in the Dos unit to report errors: var 
  DosError: integer; {Error status variable} 
The values stored in DosError are DOS error codes. A value of 0 indicates no error; other possible error codes include: 
 2 = File not found  3 = Path not found  5 = Access denied  6 = Invalid handle  8 = Not enough memory 10 = Invalid environment 11 = Invalid format 18 = No more files 
Here's a brief listing of the interrupt support procedures: 
GetIntVec procedure	Returns the address stored in a specified interrupt vector. Intr procedure	Executes a specified software interrupt. 
MsDos procedure	Executes a DOS function call. 
SetIntVec procedure	Sets a specified interrupt vector to a specified address. 
Here are the date and time procedures	
GetDate procedure	Returns the current date set in the operating system. 
GetFTime procedure	Returns the date and time a file was last written. 
GetTime procedure	Returns the current time set in the operating system. 
PackTime procedure	Converts a DateTime record into a 4-byte, packed date-and-time character Longint used by SetFTime. 
SetDate procedure	Sets the current date in the operating system. 
SetFTime procedure	Sets the date and time a file was last written. 
SetTime procedure	Sets the current time in the operating system. 
UnpackTime procedure	Converts a 4-byte, packed date-and-time character Longint returned by GetFTime, FindFirst, or FindNext into an unpacked DateTime record. 
Disk status functions	
DiskFree function	Returns the number of free bytes of a specified disk drive. 
DiskSize function	Returns the total size in bytes of a specified disk drive. 
File-handling procedures and functions	
FindFirst procedure	Searches the specified (or current) directory for the first entry matching the specified file name and set of attributes. 
FExpand function	Takes a file name and returns a fully qualified file name (drive, directory, and extension). 
FindNext procedure	Returns the next entry that matches the name and attributes specified in an earlier call to FindFirst. 
FSearch function	Searches for a file in a list of directories. 
FSplit procedure	Splits a file name into its three parts (directory, file name, and extension). 
GetFAttr procedure	Returns the attributes of a file. 
SetFAttr procedure	Sets the attributes of a file. 
Process-handling procedures and functions	
DosExitCode function	Returns the exit code of a subprocess. 
Exec procedure	Executes a specified program with a specified command line. 
Keep procedure	Keep (or Terminate Stay Resident) terminates the program and makes it stay in memory. 
SwapVectors procedure	Swaps all saved interrupt vectors with the current vectors. 
Crt unit 
The Crt unit implements a range of powerful routines that give you full control of your PC's features, such as screen mode control, extended keyboard codes, colors, windows, and sound. Crt can only be used in programs that run on IBM PCs, ATs, PS/2s, and true compatibles. 
Here are the Crt unit procedures and functions available to you: 

AssignCrt 
ClrEol 
ClrScr 
Delay 
DelLine 
GotoXY 
HighVideo 
InsLine 
KeyPressed 
LowVideo 
NormVideo 
NoSound 
ReadKey 
Sound 
TextBackground 
TextColor 
TextMode 
WhereX 
WhereY 
Window 

A brief discussion of the constants, types, and variables defined by the Crt unit follows. The constants below are used as parameters to the TextMode procedure: 
 const    BW40    = 0;{40x25 B/W on CGA}    CO40    = 1;{40x25 Color on CGA}    BW80    = 2;{80x25 B/W on CGA}    CO80    = 3;{80x25 Color on CGA}    Mono    = 7;{80x25 B/W on MDA or HGC}    Font8x8 = 256;{43-/50-line mode EGA/VGA} { Mode constants for 3.0 compatibility }    C40  = CO40;    C80  = CO80; 
BW40, C40, BW80, and C80 represent the four color text modes supported by the IBM PC Color/Graphics Adapter (CGA). The Mono constant represents the single black-and-white text mode supported by the IBM PC Monochrome Adapter. LastMode returns to the last active text mode after using graphics. 
The following constants are used in connection with the TextColor and TextBackground procedures: 
const   Black        = 0;   Blue         = 1;   Green        = 2;   Cyan         = 3;   Red          = 4;   Magenta      = 5;   Brown        = 6;   LightGray    = 7;   DarkGray     = 8;   LightBlue    = 9;   LightGreen   = 10;   LightCyan    = 11;   LightRed     = 12;   LightMagenta = 13;   Yellow       = 14;   White        = 15;   Blink        = 128; 
Colors are represented by the numbers between 0 and 15; to easily identify each color, these constants can be used instead of numbers. In the color text modes, the foreground of each character is selectable Colors are represented by the numbers between 0 and 15; to easily identify each color, these constants can be used instead of numbers. In the color text modes, the foreground of each character is selectable from 16 colors, and the background from 8 colors. The foreground of each character can also be made to blink. Here are the variables used by the Crt unit: 
var   CheckBreak: Boolean;   CheckEOF: Boolean;   DirectVideo: Boolean;   CheckSnow: Boolean;   LastMode: Word;   TextAttr: Byte;   WindMin: Word;   WindMax: Word; 
CheckBreak	CheckBreak enables and disables checks for Ctrl-Break. When CheckBreak is True, pressing Ctrl-Break will abort the program when it next writes to the display. When CheckBreak is False, pressing CtrlBreak has no effect. CheckBreak is True by default. (At run-time, Crt stores the old Ctrl-Break interrupt vector, $1B, in a global pointer variable called SaveInt1B.) 
CheckEOF	The CheckEOF variable enables and disables the end-of-file character. When CheckEOF is True, an end-of-file character is generated if you press Ctrl-Z while reading from a file assigned to the screen. When CheckEOF is False, pressing Ctrl-Z has no effect. CheckEOF is False by default. 
CheckSnow	CheckSnow enables and disables "snowchecking" when storing characters directly in video memory. When a color text mode is selected, CheckSnow is set to True, and direct video-memory writes will occur only during the horizontal retrace intervals. If you are running on a newer CGA, you may want to set CheckSnow to False at the beginning of your program and after each call to TextMode. This will disable snow-checking, resulting in significantly higher output speeds. CheckSnow has no effect when DirectVideo is False. 
DirectVideo	DirectVideo enables and disables direct memory access for Write and WriteLn statements that output to the screen. When DirectVideo is True, Writes and WriteLns to files associated with the CRT will store characters directly in video memory instead of calling the BIOS to display them. When DirectVideo is False, all characters are written through BIOS calls, which is a significantly slower process. DirectVideo always defaults to True. If, for some reason, you want characters displayed through BIOS calls, set DirectVideo to False at the beginning of your program and after each call to TextMode. TextAttr stores the currently selected text attributes. The text attributes are normally set through calls to TextColor and TextBackground. However, you can also set them by directly storing a value in TextAttr. 
WindMin, WindMax	WindMin and WindMax store the screen coordinates of the current window. These variables are set by calls to the Window procedure. WindMin defines the upper left corner, and WindMax defines the lower right corner. The X coordinate is stored in the low byte, and the Y coordinate is stored in the high byte. For example, Lo(WindMin) produces the X coordinate of the left edge, and Hi(WindMax) produces the Y coordinate of the bottom edge. The upper left corner of the screen corresponds to (X,Y) = (0,0). Note, however, that for coordinates passed to Window and GotoXY, the upper left corner is at (1,1). 
LastMode	Each time TextMode is called, the current video mode is stored in LastMode. In addition, LastMode is initialized at program startup to the then-active video mode. 
Overlay unit 
The Overlay unit contains procedures, functions, and symbols that let you use Turbo Pascal's overlay manager. Here are the routines in the Overlay unit: 
OvrClearBuf, OvrInitEMS, OvrGetBuf, OvrSetBuf, OvrGetRetry, OvrSetRetry, OvrInit.
܀      w           i    d       P     K  Px              j'  
j'        Y      x x   
                J  v   v P  v 6  q 7  @  l A   j'  j'  j'                               x x   
   = A A  \  g   N   N   N   N   N  j'  j'  j'  j'  j'  j'       @   [         Z        x   
  6  b I  b ^  b w  b   b   b   ]  j'  j'  j'  j'  j'  j'  j'  [   @   [             b   b 	  b -	  b N	  b z	  b 	  b 	  b  j'  j'  j'  j'  j'  j'  j'  j' <               	  	  b 	  ] 	  D 
  D 1
  D  j'  j'  j'  j'  j'  j'  <                <               1
  G
  b ]
  b u
  b 
  b 
  b 
  b 
  b   b  j'  j'  j'  j'  j'  j'  j'  j' <                   b 4  ] `  D   D   D                                j'  <                <                   b   b   b   b   b 5  b Q  b n  b                                                 <               n    b   b   b   b 
  b 
  b 1
  b K
  b                                                 <               K
  \
  v r
  ] 
  ] 
  ] 
  ] 
  ] 
  ]                                                    <                
     b   ]   ]   ]   X O  S                                                =  = <               O  h  v   q   l   g D  g a  b p  b                                           =  = ? = ? = ? p  B  v W  q   l   l   l   l    l    l "  l                                                       = ? = 	"  "  v #  q #  l D%  g ]%  b v%  b %  ]                                                     ? =  =  %  %  v %  v %  v %  v '  v e)  v S+  v o+  q +  l                                                       =  = 	+  +  v +  v +  v +.  v F.  q _.  l p.  l .  l .  l                                                       =  = 	.  3  v 3  q 3  l 3  l 4  l /4  l 7  l 7  g                                                         =  = 7  7  v 7  v 7  v 8  v :  v :  q :  l :  l :  l                                                       =  = 	:  ;  v G;  v <  v <  q <  l <  l <  l =  l b=  l                                                       =  = 	b=  qB  v B  q B  l B  l B  l B  l E  l 'E  g                                                         =  = 'E  @E  v QE  v `E  v E  v E  v H  v I  q I  l -I  l                                                       =  = 	-I  ;I  v aI  v XK  v yK  q K  l K  l K  l K  l M  l                                                       =  = 	M  M  v N  q %N  q 3N  q ^N  q O  q O  l jP  g                                                        =  =  jP  ~P  v P  q P  l P  l Q  l Q  l +Q  g CQ  b                                                   =  ? = ? CQ  QQ  v |Q  v Q  v T  v T  q U  l U  l =U  l |U  l                                                       =  = 	|U  W  v X  q 1X  l PX  l _X  l X  l "Z  l @Z  g                                                         =  = @Z  XZ  v fZ  v ~Z  v Z  v 	]  v ]  q <_  l O_  l h_  l                                                       =  = 	h_  y_  v _  v 4a  v @a  q b  l $b  g                                                                    A =  = $b  Nb  b {b  b b  b b  b b  b c  b  c  b Ac  b                                                   @   [         Ac  Vc  b c  b c  b c  b d  b 9d  b Xd  b ~d  b                                                   @   [         ~d  d  b d  b d  b 
e  b 0e  b Re  b ke  b e  b                                                   @   [         e  e  b f  b /f  b af  b ~f  b f  b f  b                                                         @   [         f  f  v hh  q h  l h  g h  b k  ] k                                                     =  = ? =  k  k  v k  k  ] %k  ] .k  ] 4k  ] =k  ]                                                    >                =k  Dk  b Jk  b Qk  b \k  b gk  b uk  b k  b k  b                                                 >               k  k  b k  b k  b k  b k  b k  b k  b k  b                                                 >               k  k  b k  b k  b l  b 
l  b !l  b 1l  b :l  b                                                 >               :l  Il  b Vl  b `l  b jl  b xl  b l  b l  b l  b                                                 >               l  l  b l  b l  b l  b l  b l  b l  b l  b                                                 >               l  m  b m  b m  b #m  b .m  b 9m  b Am  b Gm  b                                                 >               Gm  Mm  b Sm  b _m  b mm  b zm  b m  b m  b m  b                                                 >               m  m  b m  b m  b m  b m  b m  b m  b m  b                                                 >               m  m  b m  b m  b m  b n  b n  b n  b n  b                                                 >               n  n  b $n  b 1n  b =n  b En  b Nn  b Wn  b `n  b                                                 >               `n  in  b jn  n  ] n  n  D                                       >                >               n  n  b n  b n  b n  b n  b n  b n  b n  b                                                 >               n  n  b n  b n  b o  b o  b o  b !o  b 'o  b                                                 >               'o  /o  b 8o  b Bo  b Po  b Zo  b do  b lo  b so  b                                                 >               so  zo  b o  b o  b o  b o  b o  b o  b o  b                                                 >               o  o  b o  b o  b o  b p  b p  b p  b "p  b                                                 >               "p  -p  b ?p  b Jp  b Up  b ap  b sp  b |p  b p  b                                                 >               p  p  b p  b p  b p  b p  b p  b p  b p  b                                                 >               p  p  b p  b q  b q  b q  b q  b #q  b ,q  b                                                 >               ,q  7q  b >q  b Fq  b Mq  b Vq  b \q  b hq  b rq  b                                                 >               rq  |q  b q  b q  b q  b q  b q  b q  b q  b                                                 >               q  q  b q  b q  b q  b r  b r  b #r  b /r  b                                                 >               /r  9r  b Br  b Jr  b [r  b er  b mr  b xr  b r  b                                                 >               r  r  b r  b r  b r  b r  b r  b r  b r  b                                                 >               r  r  b s  b s  b s  b ,s  b 8s  b Gs  b Ts  b                                                 >               Ts  ds  b qs  b s  b s  b s  b s  b s  b s  b                                                 >               s  s  b s  b s  b s  b t  b t  b "t  b -t  b                                                 >               -t  :t  b @t  b It  b Yt  b ht  b rt  b st                                                        >               st  t  v t  v  q Bv  q yx  q zx  x  l x                                                  >      =  x  x  b x  b x  b x  b x  b x  b x  b x  b                                                 >               x  x  b x  b x  b x  b y  b y  b y  b y  b                                                 >               y  'y  b 2y  b 9y  b >y  b Oy  b Ty  b ]y  b iy  b                                                 >               iy  uy  b }y  b y  b y  b y  b y  b y  b y  b                                                 >               y  y  b y  b y  b y  b y  b y  b y  b y  b                                                 >               y  y  b y  b y  b z  b z  b z  b z  b z  b                                                 >               z  'z  b /z  b 6z  b <z  b =z  Fz  ] Gz                                                      >               Gz  {  v {  {  q {  }  l }  !}  X                                               Y      x x x   
=  = !}  "}  (}  b /}  b 8}  b A}  b J}  b V}  b c}  b                                                   >               c}  k}  b q}  b y}  b }  b }  b }  b }  b }  b                                                   >               }  }  b }  b }  b }  b }  b }  b }  b }  b                                                   >               }  }  b }  b ~  b 
~  b ~  b ~  b &~  b /~  b                                                   >               /~  8~  b ?~  b D~  b J~  b S~  b Y~  b d~  b m~  b                                                   >               m~  r~  b w~  b ~~  b ~  b ~  b ~  b ~  b ~  b                                                   >               ~  ~  b ~  b ~  b ~  b ~  b ~  b ~  b ~  b                                                   >               ~  ~  b ~  b    b   b   b &  b 0  b 9  b                                                   >               9  A  b K  b S  b [  b f  b m  b w  b   b                                                   >                   b   b   b   b   b   b   b   b                                                   >                   b   b   b   b   b   b   b   b                                                   >                   b   b   !  N "  `  I                                      = Y      x x x   
>               `  T  v   q H  l   g   b     ]                                                x x  ? = ? = ?     Q  v f  q g  u  l v  }  g f  g                                                 ? =  ? = f     v {  v   v v  v   v   v ؏  v   v                                                          ? A 	    v   В  q   q 	    ]                                                      Y      x x x   
=      b   b    b )  b 7  b G  b T  b b  b                                                 Y>               b  m  b w  b   b   b   b   b   b ɔ  b                                                 Y>               ɔ  Ԕ  b   b   b 	  b   b *  b 5  b G  b                                                 Y>               G  T  b b  b l  b v  b   b   b   b   b                                                 Y>                   b Ε  b   b   b   b   b   b   b                                                 Y>                 (  b 4  b H  b Z  b a  b k  b t  b ~  b                                                 Y>               ~    b   b   b   b   b   b ʖ  b ޖ  b                                                 Y>               ޖ    b   b 
  b   b *  b ;  b H  b S  b                                                 Y>               S  d  b s  b   b   b   b   b   b ї  b                                                 Y>               ї    b   b    b   b   b ,  b 8  b 9                                                  Y>               9  ;  g <  Ԙ  b   ] ݛ  ] ߟ  ] b  ]                                                    ? = Y      x x x   
b  ϣ  v   v   v   v #  v j  v W  v 	  v   v                                                             x x ? 	      v   e  q f  h  ] i                                                     Y      x x x   
=  i    v   v >  v y  v а  v 
  v ~  v ֱ  v 0  v                                                       x   
= A 	0  Ҳ  v   v .  v   v   v 7  v   v Ҵ  v 7  v                                                       x   
= A 	7  }  v е  v #  v {  v ʶ  v   v L  v   v 
  v                                                       x   
= A 	
  |  v ͸  v    v   v ͹  v .  v   v   v Y  v                                                       x   
= A 	Y    v /  v   v Ѽ  v   q U  l V  b  g                                                         ? = A b  c  ̽  v ͽ  Ͻ  b н  ۽  I                                      >               Y      x x x   
= ۽    b   b   b   b   b   b &  b 0  b                                                 >               0  9  b E  b P  b \  b f  b o  b z  b   b                                                 >                   b   b   b   b   b   b Ⱦ  b Ծ  b                                                 >               Ծ  ޾  b   b   b    b   b   b $  b 1  b                                                 >               1  2  4  g 5    b 7  ]   X                                                     = ? = Y      x x x   
  W  v R  q y  l   g   b 9  ] _  X                                               ? = ? = ? = ? _  <  v   q U  l n  g   b S  ]   X                                               = ? = ? = ? =   N  v   q w  l   g ?  b o  b   b   b                                                 A = ? = ?   1  v y  v   v ;  v ~  v   v   v   v   v                                                       ? = A 	    v ]  v   v   v   v   v C  v   v   v                                                       ? = A 	    v <  v z  v   v .  v   v     q                                                         ?  A 	    v   v     b     I                                      >               Y      x x x   
=     b   b   b   b #  b /  b 9  b F  b                                                 >               F  Q  b ]  b g  b q  b y  b   b   b   b                                                 >                   b   b   b     N                                             Y      x x x   
>                 c  v   q   l )  l   g   b   ]                                                x x ? = ? = ? =     v *  v =  v v  v   v   v     q                                                         =  A 	  >  v   q                                                                                     = ? = "֐A.><7O(@>  ?(7
 
     !  7  \  j  y      ׼                                    
     G        	     
           P 1 1 e     .    #.    %. j   '. j   ). m   +.  n   -. s   /. t   1. w   3. x   5. y   7. y   9. {   ;. !{   =. |   ?. |   A.    C.    E. o   G.    I.    K.    M.    O. !   Q.    S.    U.    W.    Y.    [. $   ].    _.    a. ּ   c.    e. M   g. P   i.    k.    m.    o.    q. g   s. j   u. =   w. @   y.    {. #   }.    .          " *         01.16.9201.14.92  