home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPREF.ZIP / TRBOREF.PRT
Encoding:
Text File  |  1980-01-01  |  21.1 KB  |  394 lines

  1. 
  2.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 1
  3.              (+ = Extended Graphics, - = Turtle Graphics)
  4.  
  5.    **GAppendH(F)       open text file F for append only
  6.     +GArcH(X,Y,A,R,C)  draw an arc at X,Y A degrees with radius R, color C
  7.      GAssignH(F,N)     assign file F to filename N
  8.     -GBackH(D)         move turtle back distance D
  9.      GBlockReadH(F,D,N)  read N blocks to D from file F
  10.      GBlockWriteH(F,D,N) write N blocks from D to file F
  11.      GChainH(F)        chain to file F
  12.    **GChDirH(S)        changes the current directory to path string S
  13.     -GClearScreenH     clear active window and home turtle
  14.      GCloseH(F)        close file F
  15.      GClrEOLH          clear to end of current screen line
  16.      GClrScrH          clear entire screenand place cursor in upper left corner
  17.     +GCircleH(X,Y,R,C) draw circle at X,Y with radius R in color C
  18.     +GColorTableH(C1,C2,C3,C4)  set color translation table
  19.      GCrtExitH         sends the terminal reset string to the screen
  20.      GCrtInitH         send the terminal initialization string to the screen
  21.      GDelayH(M)        delay M milliseconds
  22.      GDeleteH(S,P,L)   delete section of string S
  23.      GDelLineH         deletes line containing cursor and moves all lines below up
  24.     *GDisposeH(P)      recover memory used by P^
  25.     *GDrawH(X1,Y1,X2,Y2,C)  draw line between two coordinates
  26.      GEraseH(F)        delete file F
  27.      GExecuteH(F)      execute file F
  28.    **GExitH            exit the current block
  29.      GFillCharH(V,L,D) fill V with data D for L bytes
  30.     +GFillPatternH(X1,Y1,X2,Y2,C)  fill rectangular area with pattern in color C
  31.     +GFillScreenH(C)   fill active window with color C
  32.     +GFillShapeH(X,Y,FC,BC) fill area having border color BC with color FC
  33.      GFlushH(F)        empty internal sector buffer for file F
  34.     -GForwdH(D)        move turtle forward distance D
  35.     *GFreeMemH(P,I)    reclaim I bytes of memory used by P^
  36.    **GGetDirH(D,S)     return current subdirectory for drive D in string S
  37.      GGetMemH(P,I)     allocate I bytes of memory for P^
  38.     +GGetPicH(B,X1,Y1,X2,Y2)  copy contents of rectangle from screen into buffer B
  39.      GGotoXYH(X,Y)     move cursor to X,Y (1,1 = upper left)
  40.     *GGraphBackgroundH(N)  set background to one of 16 colors
  41.     *GGraphColorModeH  set mode to 320x200 dots color graphics
  42.     *GGraphModeH       set mode to 320x200 dots black & white graphics
  43.     *GGraphWindowH(X1,Y1,X2,Y2)  define active window (default = 0,0,319,199)
  44.      GHaltH            stop program execution
  45.    **GHaltH(I)         stop program execution and pass return code I to DOS
  46.     -GHideTurtleH      hide the turtle so it is not shown on screen
  47.      GHighVideoH       sets high intensity display mode
  48.  
  49.                                                                Procedures
  50.  
  51.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 2
  52.              (+ = Extended Graphics, - = Turtle Graphics)
  53.  
  54.     *GHiResH           640x200 dots black & one color graphics
  55.     *GHiResColorH(C)   select single color for HiRes graphics
  56.     -GHomeH            put the turtle to its home position, heading 0
  57.      GInsertH(S,D,P)   insert string D into string S at position P
  58.      GInsLineH         insert an empty line at the cursor and move lines below down
  59.      GIntrH(I,R)       perform interrupt I with regs R
  60.      GLongSeekH(F,P)   move to record P in file F, argument P is real
  61.      GLowVideoH        sets low intensity display mode
  62.      GMarkH(P)         mark heap pointer at P^
  63.    **GMkDirH(S)        create new subdirectory specified in string S
  64.      GMoveH(S,D,L)     move L bytes from S to D directly in memory
  65.      GMsDosH(R)        make call to MS-DOS with regs R
  66.      GNewH(P)          create memory for P^
  67.      GNormVideoH       sets high intensity display mode
  68.     *GNoSoundH         turn off speaker
  69.     -GNoWrapH          disable turtle from wrapping around window
  70.    **GOvrPathH(S)      specify path in string S for overlay files
  71.     *GPaletteH(I)      activate specifed palette
  72.       ┌────────────────────────────────────────────────────────────────────────┐
  73.       │ color number:     0             1                2               3     │
  74.       ├────────────┬───────────────┬──────────────┬───────────────┬────────────┤
  75.       │ palette 0  │  background   │  green       │   red         │   brown    │
  76.       │ palette 1  │  background   │  cyan        │   magenta     │   lightgray│
  77.       │ palette 2  │  background   │  lightgreen  │   lightred    │   yellow   │
  78.       │ palette 3  │  background   │  lightcyan   │   lightmagenta│   white    │
  79.       └────────────┴───────────────┴──────────────┴───────────────┴────────────┘
  80.     +GPatternH(P)      define pattern used by FillPattern procedure
  81.     -GPenDownH         put pen down so line is drawn when turtle moves
  82.     -GPenUpH           lift the pen so turtle moves without drawing line
  83.     *GPlotH(X,Y,C)     plot a point at X,Y in color C
  84.     +GPutPicH(B,X,Y)   copy contents of buffer B onto screen at X,Y
  85.      GRandomizeH       initialize random number generator seed
  86.      GReadH(P1,...)    read items in from the keyboard
  87.      GReadH(F,P1,...)  read items from file F
  88.      GReadlnH(P1,...)  same as Read except moves to new line at end
  89.      GReadlnH(F,P1,..) same as Read except moves to new line at end
  90.      GReleaseH(P)      reset heap pointer to P^
  91.      GRenameH(F,N)     rename file F to file name N
  92.      GResetH(F)        open existing file
  93.    **GResetH(F,N)      open existing file with record size N
  94.      GRewriteH(F)      open new file (erase if already exists)
  95.    **GRewriteH(F,N)    open new file as above with record size N
  96.    **GRmDirH(S)        remove subdirectory specified in string S
  97.  
  98.                                                                Procedures
  99.  
  100.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 3
  101.              (+ = Extended Graphics, - = Turtle Graphics)
  102.  
  103.      GSeekH(F,P)       move to record P in file F
  104.     -GSetHeadingH(A)   turn turtle to angle A (0 is upward)
  105.     -GSetPenColorH(C)  set the pen color to C
  106.     -GSetPositionH(X,Y)  move turtle to coordinates X,Y without drawing line
  107.     -GShowTurtleH      display turtle on screen
  108.     *GSoundH(I)        turn on speaker at frequency I Hz
  109.      GStrH(N,S)        convert number N to string S
  110.     *GTextBackgroundH(I)  set background color (0 thru 7)
  111.     *GTextColorH(I)    set character color
  112.  
  113.           ┌──────────────┬──────┐┌───────────────┬─────┐
  114.           │ Black        │   0  ││  DarkGray     │   8 │
  115.           │ Blue         │   1  ││  LightBlue    │   9 │
  116.           │ Green        │   2  ││  LightGreen   │  10 │
  117.           │ Cyan         │   3  ││  LightCyan    │  11 │
  118.           │ Red          │   4  ││  LightRed     │  12 │
  119.           │ Magenta      │   5  ││  LightMagenta │  13 │
  120.           │ Brown        │   6  ││  Yellow       │  14 │
  121.           │ LightGray    │   7  ││  White        │  15 │
  122.           ├──────────────┼──────┤├───────────────┼─────┤
  123.           │ Blink        │  16  ││               │     │
  124.           └──────────────┴──────┘└───────────────┴─────┘
  125.  
  126.     *GTextModeH(I)     25 lines of 40 or 80 characters
  127.  
  128.            ┌───────────────────┬─────────────────────┐
  129.            │ BW40        0     │      BW80        2  │
  130.            │ C40         1     │      C80         3  │
  131.            └───────────────────┴─────────────────────┘
  132.  
  133.    **GTruncateH(F)     truncates file F at current position of file pointer
  134.     -GTurnLeftH(A)     turn turtle left A degrees from current direction
  135.     -GTurnRightH(A)    turn turtle right A degrees from current direction
  136.     -GTurtleDelayH(D)  set delay in milliseconds between each step of turtle
  137.     -GTurtleWindowH(X,Y,W,H)  define active window at X,Y, height H, width W
  138.      GValH(S,N,P)      convert string S to number N (error in P)
  139.     *GWindowH(X1,Y1,X2,Y2)  define active window on screen (default = 1,1,80,25)
  140.     -GWrapH            enable turtle to wrap around window
  141.      GWriteH(P1,...)   write items out to screen
  142.      GWriteH(F,P1,...) write items out to file F
  143.      GWritelnH(P1,...) same as write except starts new line at end
  144.      GWritelnH(F,P1,.) same as write except starts new line at end
  145.  
  146.  
  147.                                                                Procedures
  148.  
  149.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 4
  150.              (+ = Extended Graphics, - = Turtle Graphics)
  151.  
  152.      GAbsH(A)          absolute value of A (real, integer)
  153.      GAddrH(V)         address of variable V (pointer)
  154.      GAddrH(SubP)      address of subprogram SubP (pointer)
  155.      GArcTanH(X)       arctangent of X (real)
  156.      GChrH(I)          character with ASCII value I (char)
  157.      GConcatH(S,...S)  concatenation of strings (string)
  158.      GCopyH(S,P,L)     substring at P length L (string)
  159.      GCosH(X)          cosine of X (real)
  160.      GEofH(F)          end-of-file test on file F (boolean)
  161.      GEolnH(F)         end-of-line test on file F (boolean)
  162.      GExpH(X)          exponential of X (real)
  163.      GFilePosH(F)      current record in file F (integer)
  164.      GFileSizeH(F)     total records in file F (integer)
  165.      GFracH(X)         fractional portion of X (real)
  166.     +GGetDotColorH(X,Y)  color value of dot at X,Y (integer)
  167.     -GHeadingH         direction the turtle is currently pointing (integer)
  168.      GHiH(I)           upper byte of I (integer)
  169.      GIntH(X)          integer portion of X (real)
  170.      GIOresultH        error code for IO operation
  171.             ┌────┬──────────────────────────────────────────────┐
  172.             │ 00 │  successful completion                       │
  173.             │ 01 │  file does not exist                         │
  174.             │ 02 │  file not open for input                     │
  175.             │ 03 │  file not open for output                    │
  176.             │ 04 │  file not open                               │
  177.             │ 10 │  error in numeric format                     │
  178.             │ 20 │  operation not allowed on a logical device   │
  179.             │ 21 │  not allowed in direct mode                  │
  180.             │ 22 │  assign to Std files not allowed             │
  181.             │ 90 │  record length mismatch                      │
  182.             │ 91 │  seek beyond end-of-file                     │
  183.             │ 99 │  unexpected end-of-file                      │
  184.             │ F0 │  disk write error                            │
  185.             │ F1 │  directory full                              │
  186.             │ F2 │  file size overflow                          │
  187.             │ F3 │  too many open files                         │
  188.             │ FF │  file disappeared                            │
  189.             └────┴──────────────────────────────────────────────┘
  190.      GKeyPressedH      keyboard status flag (boolean)
  191.      GLengthH(S)       length of string S (integer)
  192.      GLnH(X)           natural logarithm of X (real)
  193.      GLoH(I)           lower byte of I (integer)
  194.  
  195.  
  196.                                                                 Functions
  197.  
  198.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 5
  199.              (+ = Extended Graphics, - = Turtle Graphics)
  200.  
  201.      GLongFilePosH(F)  current position of file pointer (real)
  202.      GLongFileSizeH(F  size of the disk file (real)
  203.     *GMaxAvailH        size of the largest block of free space on heap
  204.      GMemAvailH        paragraphs available (integer)
  205.      GOddH(I)          odd/even test of I (boolean)
  206.      GOrdH(Sc)         ordinal value of scalar variable (integer)
  207.      GPosH(P,S)        position of string P in string S (integer)
  208.      GPtrH(seg,offset) pointer to address seg:offset (pointer)
  209.      GPredH(Sc)        predecessor of scalar value (same type)
  210.    **GParamCountH      length of command line parameter string (integer)
  211.    **GParamStrH(N)     command line parameter N (string)
  212.      GRandomH          random value from 0.0 to 0.999... (real)
  213.      GRandomH(I)       random value from 0 to I-1 (integer)
  214.      GRoundH(X)        rounded-off value of real (integer)
  215.    **GSeekEofH(F)      end-of-file test for text file (boolean)
  216.    **GSeekEolnH(F)     end-of-line test for text file (boolean)
  217.      GSinH(X)          sine of X (real)
  218.      GSizeOfH(V)       size in bytes of variable V (integer)
  219.      GSizeOfH(T)       size in bytes of data type T (integer)
  220.      GSqrH(A)          A * A (real, integer)
  221.      GSqrtH(A)         square root of A (real)
  222.      GSuccH(Sc)        successor of scalar value (same type)
  223.      GSwapH(I)         I with upper, lower bytes swapped (integer)
  224.      GTruncH(X)        truncated value of X (integer)
  225.     -GTurtleThereH     turtle visable test (boolean)
  226.      GUpCaseH(C)       C converted to uppercase (char)
  227.     *GWhereXH          X coordinate of cursor (integer)
  228.     *GWhereYH          Y coordinate of cursor (integer)
  229.     -GXcorH            turtle's current X-coordinate (integer)
  230.     -GYcorH            turtle's current Y-coordinate (integer)
  231.  
  232.     GAbsolute Addresses:H
  233.           ┌──────────────────┬────────────┬────────────┐
  234.           │ Parameter        │Version 2.00│Version 3.00│
  235.           ├──────────────────┼────────────┼────────────┤
  236.           │ Windows: X1-1    │ DSeg:$0156 │ DSeg:$0004 │
  237.           │          Y1-1    │ DSeg:$0157 │ DSeg:$0005 │
  238.           │          X2      │ CSeg:$016A │ CSeg:$016A │
  239.           │          Y2      │ CSeg:$016B │ CSeg:$016B │
  240.           │ Text Attributes  │ DSeg:$0155 │ DSeg:$0008 │
  241.           │ Min Free Dyn Mem │ CSeg:$2835 │ CSeg:$2CC3 │
  242.           │ Max Free Dyn Mem │ CSeg:$2837 │ CSeg:$2CC5 │
  243.           └──────────────────┴────────────┴────────────┘
  244.  
  245.      Absolute Addresses                                         Functions
  246.  
  247.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 6
  248.              (+ = Extended Graphics, - = Turtle Graphics)
  249.  
  250.      GAuxH             assigned to the AUX: auxiliary device (modem)
  251.      GAuxInPtrH        contains address of the AuxIn function (AUX:)
  252.      GAuxOutPtrH       contains address of the AuxOut procedure (AUX:)
  253.      GBooleanH         True or False, False < True (one byte)
  254.      GBufLenH          change console input buffer limit (0..127) default = 127
  255.      GByteH            subrange of integer 0..255 (one byte)
  256.      GCharH            one ASCII character (one byte)
  257.      GConH             assigned to the CON: console device (CRT, keyboard) buffered
  258.      GConInPtrH        contains address of the ConIn function (CON:,TRM:,KBD:)
  259.      GConOutPtrH       contains address of the ConOut procedure (CON:,TRM:,KBD:)
  260.      GConStPtrH        contains address of the ConSt function (keypressed)
  261.      GCsegH            returns the address of the Code Segment
  262.      GDsegH            returns the address of the Data Segment
  263.    **GErr:H            assigned to the MS-DOS standard error output file
  264.      GFalseH           boolean false constant
  265.      GHeapPtrH         value of the heap pointer
  266.    **GInp:H            assigned to the MS-DOS standard input file
  267.      GInputH           primary input file ($B+ = CON: or $B- = TRM:)
  268.      GIntegerH         whole numbers from -32,767(8) to 32,767 (two bytes)
  269.      GKbdH             assigned to the KBD: keyboard input device (not echoed)
  270.      GLstH             assigned to the LST: list output device (printer)
  271.      GLstOutPtrH       contains address of the LstOut procedure (LST:)
  272.      GMaxIntH          constant = 32767 (largest integer allowed)
  273.      GMemH[0000:0000]  byte array to access memory
  274.      GMemWH[0000:0000] word array to access memory LSB|MSB
  275.      GOfsH(name)       returns the offset in memory of name
  276.    **GOut:H            assigned to the MS-DOS standard output file
  277.      GOutputH          primary output file ($B+ = CON: or $B- = TRM:)
  278.      GPiH              constant = 3.1415926536E+00
  279.      GPortH[0000]      byte array to access IO Ports
  280.      GPortWH[0000]     word array to access IO Ports
  281.      GRealH            range of 1E-38 to 1E+38, 11 significant digits (six bytes)
  282.      GSegH(name)       returns the address of the segment containing name
  283.      GSsegH            returns the address of the Stack Segment
  284.      GTextH            standard type identifier for text file
  285.      GTrmH             assigned to the TRM: terminal device (CRT, keyboard) (echoed)
  286.      GTrueH            boolean true constant
  287.      GUsrH             assigned to the USR: user device (user input/output routines)
  288.      GUsrInPtrH        contains address of the UsrIn function (USR:)
  289.      GUsrOutPtrH       contains address of the UsrOut procedure (USR:)
  290.  
  291.  
  292.  
  293.  
  294.                                                      Standard Identifiers
  295.  
  296.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 7
  297.              (+ = Extended Graphics, - = Turtle Graphics)
  298.  
  299.  
  300.      Compiler Directives:H     Syntax {$B-,C-} or {$IWindow.Pas}
  301.  
  302.      GB+H    Controls input/ouput mode selection
  303.              B+ = CON: device assigned to standard files Input and Output
  304.              B- = Trm: device assigned to standard files Input and Output
  305.      GC+H    Controls control character interpretation during console I/O
  306.              C+ = Ctrl-C in response to Read or Readln will interrupt program
  307.                   Ctrl-S will toggle screen output off and on
  308.              C- = control characters are not interpreted
  309.    **GD+H    Controls device checking (G,P non-zero)
  310.              D+ = disable buffering if file is assigned to device
  311.              D- = all device I/O operations are buffered
  312.    **GF16H   Controls number of files that may be open simultaneously
  313.              Set files=nn parameter in Config.Sys file to if more than 8
  314.    **GG0H    Input file buffer
  315.              0  = Input file refers to CON: or TRM: device
  316.              non 0 = Input file refers to MS-DOS standard input handle
  317.      GI+H    Controls I/O error handling
  318.              I+ = all I/O operations are checked for errors
  319.              I- = program must check for I/O errors using IOResult
  320.              I filename = include file in compilation
  321.      GK+H    Controls the generation of stack check code
  322.              K+ = check is made to ensure that space is available for local
  323.                   variables on the stack before each call to a subprogram
  324.              K- = no checks are made
  325.    **GP0H    Output file buffer
  326.              0  = Output file refers to CON: or TRM: device
  327.              non 0 = Output file refers to MS-DOS standard output handle
  328.      GR-H    Controls run-time index checks
  329.              R+ = all array indexing operations are checked to be within bounds
  330.              R- = no checks are performed
  331.      GV+H    Controls type checking on strings passed as VAR parameters
  332.              V+ = strict type checking is performed
  333.              V- = allows passing of actual parameters which do not match the
  334.                   length of the formal parameter
  335.      GU-H    Controls user interrupts
  336.              U+ = user may interrupt the program anytime with Ctrl-C
  337.              U- = Ctrl-C has no effect (See C Compiler Directive)
  338.  
  339.  
  340.  
  341.  
  342.  
  343.                                                       Compiler Directives
  344.  
  345.      TURBO Pascal Reference Summary (* = V2.0, ** = V3.0)          Page 8
  346.              (+ = Extended Graphics, - = Turtle Graphics)
  347.  
  348.      GRun-Time Error Messages:H
  349.  
  350.             ┌────┬─────────────────────────────────────────────┐
  351.             │ 01 │  Floating point overflow                    │
  352.             │ 02 │  Division by zero attempted                 │
  353.             │ 03 │  Sqrt argument error (negative)             │
  354.             │ 04 │  Ln argument error (zero or negative)       │
  355.             │ 10 │  String length error (>255, or >0 to char)  │
  356.             │ 11 │  Invalid string index (not 1..255)          │
  357.             │ 90 │  Index out of range                         │
  358.             │ 91 │  Scalar or subrange out of range            │
  359.             │ 92 │  Out of integer range (Trunc or Round)      │
  360.             │ F0 │  Overlay file not found                     │
  361.             │ FF │  Heap/stack collision                       │
  362.             └────┴─────────────────────────────────────────────┘
  363.  
  364.      GReserved Words:
  365.  
  366.      absolute        external        nil             shl
  367.      and             file            not             shr
  368.      array           for             of              string
  369.      begin           forward         or              then
  370.      case            function       *overlay         to
  371.      const           goto            packed          type
  372.      div             if              procedure       until
  373.      do              in              program         var
  374.      downto          inline          record          while
  375.      else            label           repeat          with
  376.      end             mod             set             xorH
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.      Reserved Words                              Run-Timer Error Messages
  393. 
  394.