home *** CD-ROM | disk | FTP | other *** search
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 1
- (+ = Extended Graphics, - = Turtle Graphics)
-
- **GAppendH(F) open text file F for append only
- +GArcH(X,Y,A,R,C) draw an arc at X,Y A degrees with radius R, color C
- GAssignH(F,N) assign file F to filename N
- -GBackH(D) move turtle back distance D
- GBlockReadH(F,D,N) read N blocks to D from file F
- GBlockWriteH(F,D,N) write N blocks from D to file F
- GChainH(F) chain to file F
- **GChDirH(S) changes the current directory to path string S
- -GClearScreenH clear active window and home turtle
- GCloseH(F) close file F
- GClrEOLH clear to end of current screen line
- GClrScrH clear entire screenand place cursor in upper left corner
- +GCircleH(X,Y,R,C) draw circle at X,Y with radius R in color C
- +GColorTableH(C1,C2,C3,C4) set color translation table
- GCrtExitH sends the terminal reset string to the screen
- GCrtInitH send the terminal initialization string to the screen
- GDelayH(M) delay M milliseconds
- GDeleteH(S,P,L) delete section of string S
- GDelLineH deletes line containing cursor and moves all lines below up
- *GDisposeH(P) recover memory used by P^
- *GDrawH(X1,Y1,X2,Y2,C) draw line between two coordinates
- GEraseH(F) delete file F
- GExecuteH(F) execute file F
- **GExitH exit the current block
- GFillCharH(V,L,D) fill V with data D for L bytes
- +GFillPatternH(X1,Y1,X2,Y2,C) fill rectangular area with pattern in color C
- +GFillScreenH(C) fill active window with color C
- +GFillShapeH(X,Y,FC,BC) fill area having border color BC with color FC
- GFlushH(F) empty internal sector buffer for file F
- -GForwdH(D) move turtle forward distance D
- *GFreeMemH(P,I) reclaim I bytes of memory used by P^
- **GGetDirH(D,S) return current subdirectory for drive D in string S
- GGetMemH(P,I) allocate I bytes of memory for P^
- +GGetPicH(B,X1,Y1,X2,Y2) copy contents of rectangle from screen into buffer B
- GGotoXYH(X,Y) move cursor to X,Y (1,1 = upper left)
- *GGraphBackgroundH(N) set background to one of 16 colors
- *GGraphColorModeH set mode to 320x200 dots color graphics
- *GGraphModeH set mode to 320x200 dots black & white graphics
- *GGraphWindowH(X1,Y1,X2,Y2) define active window (default = 0,0,319,199)
- GHaltH stop program execution
- **GHaltH(I) stop program execution and pass return code I to DOS
- -GHideTurtleH hide the turtle so it is not shown on screen
- GHighVideoH sets high intensity display mode
-
- Procedures
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 2
- (+ = Extended Graphics, - = Turtle Graphics)
-
- *GHiResH 640x200 dots black & one color graphics
- *GHiResColorH(C) select single color for HiRes graphics
- -GHomeH put the turtle to its home position, heading 0
- GInsertH(S,D,P) insert string D into string S at position P
- GInsLineH insert an empty line at the cursor and move lines below down
- GIntrH(I,R) perform interrupt I with regs R
- GLongSeekH(F,P) move to record P in file F, argument P is real
- GLowVideoH sets low intensity display mode
- GMarkH(P) mark heap pointer at P^
- **GMkDirH(S) create new subdirectory specified in string S
- GMoveH(S,D,L) move L bytes from S to D directly in memory
- GMsDosH(R) make call to MS-DOS with regs R
- GNewH(P) create memory for P^
- GNormVideoH sets high intensity display mode
- *GNoSoundH turn off speaker
- -GNoWrapH disable turtle from wrapping around window
- **GOvrPathH(S) specify path in string S for overlay files
- *GPaletteH(I) activate specifed palette
- ┌────────────────────────────────────────────────────────────────────────┐
- │ color number: 0 1 2 3 │
- ├────────────┬───────────────┬──────────────┬───────────────┬────────────┤
- │ palette 0 │ background │ green │ red │ brown │
- │ palette 1 │ background │ cyan │ magenta │ lightgray│
- │ palette 2 │ background │ lightgreen │ lightred │ yellow │
- │ palette 3 │ background │ lightcyan │ lightmagenta│ white │
- └────────────┴───────────────┴──────────────┴───────────────┴────────────┘
- +GPatternH(P) define pattern used by FillPattern procedure
- -GPenDownH put pen down so line is drawn when turtle moves
- -GPenUpH lift the pen so turtle moves without drawing line
- *GPlotH(X,Y,C) plot a point at X,Y in color C
- +GPutPicH(B,X,Y) copy contents of buffer B onto screen at X,Y
- GRandomizeH initialize random number generator seed
- GReadH(P1,...) read items in from the keyboard
- GReadH(F,P1,...) read items from file F
- GReadlnH(P1,...) same as Read except moves to new line at end
- GReadlnH(F,P1,..) same as Read except moves to new line at end
- GReleaseH(P) reset heap pointer to P^
- GRenameH(F,N) rename file F to file name N
- GResetH(F) open existing file
- **GResetH(F,N) open existing file with record size N
- GRewriteH(F) open new file (erase if already exists)
- **GRewriteH(F,N) open new file as above with record size N
- **GRmDirH(S) remove subdirectory specified in string S
-
- Procedures
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 3
- (+ = Extended Graphics, - = Turtle Graphics)
-
- GSeekH(F,P) move to record P in file F
- -GSetHeadingH(A) turn turtle to angle A (0 is upward)
- -GSetPenColorH(C) set the pen color to C
- -GSetPositionH(X,Y) move turtle to coordinates X,Y without drawing line
- -GShowTurtleH display turtle on screen
- *GSoundH(I) turn on speaker at frequency I Hz
- GStrH(N,S) convert number N to string S
- *GTextBackgroundH(I) set background color (0 thru 7)
- *GTextColorH(I) set character color
-
- ┌──────────────┬──────┐┌───────────────┬─────┐
- │ Black │ 0 ││ DarkGray │ 8 │
- │ Blue │ 1 ││ LightBlue │ 9 │
- │ Green │ 2 ││ LightGreen │ 10 │
- │ Cyan │ 3 ││ LightCyan │ 11 │
- │ Red │ 4 ││ LightRed │ 12 │
- │ Magenta │ 5 ││ LightMagenta │ 13 │
- │ Brown │ 6 ││ Yellow │ 14 │
- │ LightGray │ 7 ││ White │ 15 │
- ├──────────────┼──────┤├───────────────┼─────┤
- │ Blink │ 16 ││ │ │
- └──────────────┴──────┘└───────────────┴─────┘
-
- *GTextModeH(I) 25 lines of 40 or 80 characters
-
- ┌───────────────────┬─────────────────────┐
- │ BW40 0 │ BW80 2 │
- │ C40 1 │ C80 3 │
- └───────────────────┴─────────────────────┘
-
- **GTruncateH(F) truncates file F at current position of file pointer
- -GTurnLeftH(A) turn turtle left A degrees from current direction
- -GTurnRightH(A) turn turtle right A degrees from current direction
- -GTurtleDelayH(D) set delay in milliseconds between each step of turtle
- -GTurtleWindowH(X,Y,W,H) define active window at X,Y, height H, width W
- GValH(S,N,P) convert string S to number N (error in P)
- *GWindowH(X1,Y1,X2,Y2) define active window on screen (default = 1,1,80,25)
- -GWrapH enable turtle to wrap around window
- GWriteH(P1,...) write items out to screen
- GWriteH(F,P1,...) write items out to file F
- GWritelnH(P1,...) same as write except starts new line at end
- GWritelnH(F,P1,.) same as write except starts new line at end
-
-
- Procedures
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 4
- (+ = Extended Graphics, - = Turtle Graphics)
-
- GAbsH(A) absolute value of A (real, integer)
- GAddrH(V) address of variable V (pointer)
- GAddrH(SubP) address of subprogram SubP (pointer)
- GArcTanH(X) arctangent of X (real)
- GChrH(I) character with ASCII value I (char)
- GConcatH(S,...S) concatenation of strings (string)
- GCopyH(S,P,L) substring at P length L (string)
- GCosH(X) cosine of X (real)
- GEofH(F) end-of-file test on file F (boolean)
- GEolnH(F) end-of-line test on file F (boolean)
- GExpH(X) exponential of X (real)
- GFilePosH(F) current record in file F (integer)
- GFileSizeH(F) total records in file F (integer)
- GFracH(X) fractional portion of X (real)
- +GGetDotColorH(X,Y) color value of dot at X,Y (integer)
- -GHeadingH direction the turtle is currently pointing (integer)
- GHiH(I) upper byte of I (integer)
- GIntH(X) integer portion of X (real)
- GIOresultH error code for IO operation
- ┌────┬──────────────────────────────────────────────┐
- │ 00 │ successful completion │
- │ 01 │ file does not exist │
- │ 02 │ file not open for input │
- │ 03 │ file not open for output │
- │ 04 │ file not open │
- │ 10 │ error in numeric format │
- │ 20 │ operation not allowed on a logical device │
- │ 21 │ not allowed in direct mode │
- │ 22 │ assign to Std files not allowed │
- │ 90 │ record length mismatch │
- │ 91 │ seek beyond end-of-file │
- │ 99 │ unexpected end-of-file │
- │ F0 │ disk write error │
- │ F1 │ directory full │
- │ F2 │ file size overflow │
- │ F3 │ too many open files │
- │ FF │ file disappeared │
- └────┴──────────────────────────────────────────────┘
- GKeyPressedH keyboard status flag (boolean)
- GLengthH(S) length of string S (integer)
- GLnH(X) natural logarithm of X (real)
- GLoH(I) lower byte of I (integer)
-
-
- Functions
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 5
- (+ = Extended Graphics, - = Turtle Graphics)
-
- GLongFilePosH(F) current position of file pointer (real)
- GLongFileSizeH(F size of the disk file (real)
- *GMaxAvailH size of the largest block of free space on heap
- GMemAvailH paragraphs available (integer)
- GOddH(I) odd/even test of I (boolean)
- GOrdH(Sc) ordinal value of scalar variable (integer)
- GPosH(P,S) position of string P in string S (integer)
- GPtrH(seg,offset) pointer to address seg:offset (pointer)
- GPredH(Sc) predecessor of scalar value (same type)
- **GParamCountH length of command line parameter string (integer)
- **GParamStrH(N) command line parameter N (string)
- GRandomH random value from 0.0 to 0.999... (real)
- GRandomH(I) random value from 0 to I-1 (integer)
- GRoundH(X) rounded-off value of real (integer)
- **GSeekEofH(F) end-of-file test for text file (boolean)
- **GSeekEolnH(F) end-of-line test for text file (boolean)
- GSinH(X) sine of X (real)
- GSizeOfH(V) size in bytes of variable V (integer)
- GSizeOfH(T) size in bytes of data type T (integer)
- GSqrH(A) A * A (real, integer)
- GSqrtH(A) square root of A (real)
- GSuccH(Sc) successor of scalar value (same type)
- GSwapH(I) I with upper, lower bytes swapped (integer)
- GTruncH(X) truncated value of X (integer)
- -GTurtleThereH turtle visable test (boolean)
- GUpCaseH(C) C converted to uppercase (char)
- *GWhereXH X coordinate of cursor (integer)
- *GWhereYH Y coordinate of cursor (integer)
- -GXcorH turtle's current X-coordinate (integer)
- -GYcorH turtle's current Y-coordinate (integer)
-
- GAbsolute Addresses:H
- ┌──────────────────┬────────────┬────────────┐
- │ Parameter │Version 2.00│Version 3.00│
- ├──────────────────┼────────────┼────────────┤
- │ Windows: X1-1 │ DSeg:$0156 │ DSeg:$0004 │
- │ Y1-1 │ DSeg:$0157 │ DSeg:$0005 │
- │ X2 │ CSeg:$016A │ CSeg:$016A │
- │ Y2 │ CSeg:$016B │ CSeg:$016B │
- │ Text Attributes │ DSeg:$0155 │ DSeg:$0008 │
- │ Min Free Dyn Mem │ CSeg:$2835 │ CSeg:$2CC3 │
- │ Max Free Dyn Mem │ CSeg:$2837 │ CSeg:$2CC5 │
- └──────────────────┴────────────┴────────────┘
-
- Absolute Addresses Functions
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 6
- (+ = Extended Graphics, - = Turtle Graphics)
-
- GAuxH assigned to the AUX: auxiliary device (modem)
- GAuxInPtrH contains address of the AuxIn function (AUX:)
- GAuxOutPtrH contains address of the AuxOut procedure (AUX:)
- GBooleanH True or False, False < True (one byte)
- GBufLenH change console input buffer limit (0..127) default = 127
- GByteH subrange of integer 0..255 (one byte)
- GCharH one ASCII character (one byte)
- GConH assigned to the CON: console device (CRT, keyboard) buffered
- GConInPtrH contains address of the ConIn function (CON:,TRM:,KBD:)
- GConOutPtrH contains address of the ConOut procedure (CON:,TRM:,KBD:)
- GConStPtrH contains address of the ConSt function (keypressed)
- GCsegH returns the address of the Code Segment
- GDsegH returns the address of the Data Segment
- **GErr:H assigned to the MS-DOS standard error output file
- GFalseH boolean false constant
- GHeapPtrH value of the heap pointer
- **GInp:H assigned to the MS-DOS standard input file
- GInputH primary input file ($B+ = CON: or $B- = TRM:)
- GIntegerH whole numbers from -32,767(8) to 32,767 (two bytes)
- GKbdH assigned to the KBD: keyboard input device (not echoed)
- GLstH assigned to the LST: list output device (printer)
- GLstOutPtrH contains address of the LstOut procedure (LST:)
- GMaxIntH constant = 32767 (largest integer allowed)
- GMemH[0000:0000] byte array to access memory
- GMemWH[0000:0000] word array to access memory LSB|MSB
- GOfsH(name) returns the offset in memory of name
- **GOut:H assigned to the MS-DOS standard output file
- GOutputH primary output file ($B+ = CON: or $B- = TRM:)
- GPiH constant = 3.1415926536E+00
- GPortH[0000] byte array to access IO Ports
- GPortWH[0000] word array to access IO Ports
- GRealH range of 1E-38 to 1E+38, 11 significant digits (six bytes)
- GSegH(name) returns the address of the segment containing name
- GSsegH returns the address of the Stack Segment
- GTextH standard type identifier for text file
- GTrmH assigned to the TRM: terminal device (CRT, keyboard) (echoed)
- GTrueH boolean true constant
- GUsrH assigned to the USR: user device (user input/output routines)
- GUsrInPtrH contains address of the UsrIn function (USR:)
- GUsrOutPtrH contains address of the UsrOut procedure (USR:)
-
-
-
-
- Standard Identifiers
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 7
- (+ = Extended Graphics, - = Turtle Graphics)
-
-
- Compiler Directives:H Syntax {$B-,C-} or {$IWindow.Pas}
-
- GB+H Controls input/ouput mode selection
- B+ = CON: device assigned to standard files Input and Output
- B- = Trm: device assigned to standard files Input and Output
- GC+H Controls control character interpretation during console I/O
- C+ = Ctrl-C in response to Read or Readln will interrupt program
- Ctrl-S will toggle screen output off and on
- C- = control characters are not interpreted
- **GD+H Controls device checking (G,P non-zero)
- D+ = disable buffering if file is assigned to device
- D- = all device I/O operations are buffered
- **GF16H Controls number of files that may be open simultaneously
- Set files=nn parameter in Config.Sys file to if more than 8
- **GG0H Input file buffer
- 0 = Input file refers to CON: or TRM: device
- non 0 = Input file refers to MS-DOS standard input handle
- GI+H Controls I/O error handling
- I+ = all I/O operations are checked for errors
- I- = program must check for I/O errors using IOResult
- I filename = include file in compilation
- GK+H Controls the generation of stack check code
- K+ = check is made to ensure that space is available for local
- variables on the stack before each call to a subprogram
- K- = no checks are made
- **GP0H Output file buffer
- 0 = Output file refers to CON: or TRM: device
- non 0 = Output file refers to MS-DOS standard output handle
- GR-H Controls run-time index checks
- R+ = all array indexing operations are checked to be within bounds
- R- = no checks are performed
- GV+H Controls type checking on strings passed as VAR parameters
- V+ = strict type checking is performed
- V- = allows passing of actual parameters which do not match the
- length of the formal parameter
- GU-H Controls user interrupts
- U+ = user may interrupt the program anytime with Ctrl-C
- U- = Ctrl-C has no effect (See C Compiler Directive)
-
-
-
-
-
- Compiler Directives
-
- TURBO Pascal Reference Summary (* = V2.0, ** = V3.0) Page 8
- (+ = Extended Graphics, - = Turtle Graphics)
-
- GRun-Time Error Messages:H
-
- ┌────┬─────────────────────────────────────────────┐
- │ 01 │ Floating point overflow │
- │ 02 │ Division by zero attempted │
- │ 03 │ Sqrt argument error (negative) │
- │ 04 │ Ln argument error (zero or negative) │
- │ 10 │ String length error (>255, or >0 to char) │
- │ 11 │ Invalid string index (not 1..255) │
- │ 90 │ Index out of range │
- │ 91 │ Scalar or subrange out of range │
- │ 92 │ Out of integer range (Trunc or Round) │
- │ F0 │ Overlay file not found │
- │ FF │ Heap/stack collision │
- └────┴─────────────────────────────────────────────┘
-
- GReserved Words:
-
- absolute external nil shl
- and file not shr
- array for of string
- begin forward or then
- case function *overlay to
- const goto packed type
- div if procedure until
- do in program var
- downto inline record while
- else label repeat with
- end mod set xorH
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Reserved Words Run-Timer Error Messages
-