Welcome to TURBO PASCAL Version 3.0! ------------------------------------ In spite of all efforts, some errors have found their way into the new TURBO 3.0 manual. In addition, a few features have been added since the manual went to print. This file contains all necessary corrections and additions, and we apologize for any inconvenience this may cause you. Please make a working copy of your TURBO disk and store the ori- ginal in a safe place. For help making a backup copy, please refer to appendix M of the TURBO PASCAL Reference Manual. Now, using your working copy, run TINST to install TURBO.COM for your terminal. Installation procedures are discussed in Chapter One and Appendix L. ******************************************* * * * Need help with TURBO? Please see * * Appendix N in your Reference Manual * * for answers to common questions. * * * ******************************************* ------------------- Contents of the READ.ME File ---------------------------- 1. CORRECTIONS to the 3.0 Reference Manual [ All versions ] 2. OMMISSIONS from the 3.0 Reference Manual [ All versions ] 3. New FEATURES [ CP/M-80 ] 4. ADDITIONAL FILE LIST [ CP/M-80 ] 5. READ.ME notes from the IBM PC implementation ------------------- CORRECTIONS ----------- Page 96 - Close --------------- Notice TURBO 3.0 uses DOS' file handles; it is therefore ALWAYS necessary to Close files, even after reading. You would otherwise quickly run out of file handles. Page 102 - SkpEoln / SkpEof ----------------------------- The correct names for these functions are SeekEof and SeekEoln. Page 114 - BlockRead / BlockWrite --------------------------------- In the PC-DOS/MS-DOS versions, the record size used in block transfers may be specified by an optional Integer parameter. on Reset or ReWrite, for example: var InFile, OutFile: File; begin Assign(InFile,'INDATA'); Reset(InFile,RecSize); Assign(OutFile,'OUTDATA'); ReWrite(OutFile,RecSize); : : where RecSize is an Integer expression. Page 162 - TextBackground ------------------------- Value must be between 0 and 7. Page 169 - Graphics Windows --------------------------- When you define a graphics window, the coordinate (0,0) is now in the upper left corner of the WINDOW, not of the physical screen. This changes figure 19-2 on page 170: 0,0 should be placed at the upper left corner of the window (not of the screen). Page 174 - GetPoint ------------------- The correct name for this procedure is GetDotColor. Page 179 - Forward ------------------ The correct name for this procedure is FORWD (not Forward which is a reserved word). Page 182 - TurtleWindow ------------------------ The turtle does not stop at the border of the window. You can still move it outside of the window, but it is not shown. Even with PenDown, it will not draw outside the window. Page 187 - On the Main Menu --------------------------- The implication that TURBO 3.0 will work with DOS versions earlier than 2.0 is an error. TURBO 3.0 REQUIRES DOS version 2.0 or later. Page 189 - ChDir ---------------- Will also log in a drive if used with a drive name, for example: ChDir('B:'); Page 189 - GetDir ----------------- The integer parameter Dr refers to following: 0 = logged drive 1 = A: 2 = B: etc. Page 208 - Function Calls ------------------------- Two of the definitions of RegPack on this page have SI and DI switched around. The correct definition is: type RegPack = record case Integer of 1: (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags: Integer); 2: (AL,AH,BL,BH,CL,CH,DL,DH : Byte); end; In addition, the type of the parameters in the example pro- cedure Timer ought to be Integer, not Real. Page 253 - MOV AL,[BP-1] ------------------------ The correct statement is: MOV AL,[BP+4] Page 293 - TURBO-BCD will compile and run any program ----------------------------------------------------- Well - almost. The Real functions Sin, Cos, ArcTan, Ln, Exp, and Sqrt and the pre-declared constant Pi are not available in TURBOBCD. Page 305 - SkpEoln / SkpEof ----------------------------- The correct names for these functions are SeekEof and SeekEoln. Page 309 - GetDot ----------------- The correct name for this procedure is GetDotColor. Page 317 - Number of Open Files -------------------------------- This example is unfortunate, because DOS can never handle more than 16 files open concurrently, regardless of what you specify in CONFIG.SYS. Page 325 - RUN-TIME ERROR MESSAGES ---------------------------------- Missing: F0 - Overlay file not found Page 327 - I/O ERROR MESSAGES ----------------------------- Missing: F3 - Too many open files (MS/PCDOS only) ------------------- OMISSIONS --------- TurtleDelay ----------- This procedure can be used to slow down the turtle movement to a speed which the eye can follow. The syntax is TurtleDelay(Ms); where Ms is an integer expression giving the delay in milliseconds between each step of the turtle. The default TurtleDelay is 0. User Written Error Handlers --------------------------- In Turbo Pascal 3.0 you may write your own error handler, which is called in case of an I/O or Run-time error. The procedure must have the following header: procedure Error(ErrNo, ErrAddr: Integer); The name of the procedure and its parameters are unim- portant, as long as it is a procedure with two value parameters of type Integer. The value passed in ErrNo is the error type and number. The most significant byte, i.e. "Hi(ErrNo)", contains the error type, and the least significant byte, i.e. "Lo(ErrNo)", contains the error number (see Appendix F or G in the Turbo Pascal Manual). The following error types are defined: 0 User Break (Ctrl-C). 1 I/O error. 2 Run-time error. In case of a user interrupt (Ctrl-C), the low byte of "ErrNo" is always 1. "ErrAddr" contains the address (offset in Code Segment for 16 bit versions) of the error. To activate the error handler, assign its offset address to the standard variable "ErrorPtr", i.e. ErrorPtr:=Ofs(Error); [ 16 bit ] or ErrorPtr:=Addr(Error); [ 8 bit ] There are no limits to what an error handler may do. Typi- cally it will close all open files, output an error mes- sage, and call the Halt standard procedure to terminate the program. If an error handler returns, i.e. if it does not call Halt, or if an error occurs within an error handler, Turbo Pascal will itself output the error message and terminate the program. ------------------- NEW FEATURES OF CP/M-80 IMPLEMENTATION OF TURBO 3.0 - AN OVERVIEW - ----------------------------------------- Inline ------ A constant identifier used in an INLINE statement does not always generate two bytes of code. Files ----- New FIB formats. Optional 4th parameter on Blockread/Write returns number of blocks actually read. SeekEoln function. SeekEof function. Misc. ----- Exit procedure - To exit the current block OvrDrive procedure - To specify the drive on which to find overlays ParamCount function - Gives number of characters in the command buffer ParamSk function - Gives the string of characters in the command line Overlays -------- Overlay files are opened and closed every time they are accessed. Therefore, there is never a need to specifically close an overlay file. The Y compiler directive is no longer supported. Instead, the OvrPath (MS-DOS MESr OvrDrive (CP/M) standard proce- dures may be used to specify the drive and subdirectory in which overlay files reside. Please note that run-time error F0 indicates that your over- lay file is missing or is called recursively. (This error number is omitted from the Reference Manual but is included elsewhere in this file.) ------------------- TURBO PASCAL Version 3.0 CP/M-80 Additional File List In addition to the list of files mentioned in Chapter 1 of your TURBO Reference Manual, the following files are included on your TURBO disk: Sample programs --------------- LISTER PAS - simple program to list your Pascal source CMDLIN PAS - get parameters from the command line CALC PAS - sample spreadsheet program CALC HLP - spreadsheonlhelp file CALCDEMO MCS - spreadsheot data file (not for use with TURBO-87) CALCMAIN PAS - extra program for compiling spreadsheonlif necessary (please see note inside CALCMAIN.PAS) ===================================================================== NOTE: The following section is the READ.ME file from the IBM PC implementation of TURBO PASCAL 3.0 and is included here for your information. --------------------------------------------------------------------- GENERAL OVERVIEW OF NEW FEATURES OF TURBO 3.0 --------------------------------------------- A program that was written using TURBO 2.0 may behave differently using TURBO 3.0: - TURBO no longer does a ClrScr when your program first begins - TURBO no longer does a GoToXY(1, 25) when your program terminates - use of file handles now necessitates closing all files; you should also place a "FILES =" statement in your CONFIG.SYS file (please consult your DOS reference manual for more information). - a read statement using the logical device TRM is terminated with a . TINST Installation ------------------ TINST now allows you to install a pathname which is used by TURBO when loading the error message file (TURBO.MSG). In the screen installation, after choosing your display type, the following question will appear: Does your screen blink when the text scrolls? (Y/N): If the screen is "snowy" in the TURBO editor, answer "Y" to this question. Chain and Execute ----------------- Heap preserved during Chain (MS/PC-DOS & CP/M-86). Chain and Execute no longer set a flag in the command line parameter. Inline ------ A constant identifier used in a INLINE statement does not always generate two bytes of code. Files ----- Append procedure (MS/PC-DOS . Full DOS path-name supported (MS/PC-DOS . I/O re-direction (MS/PC-DOS . New FIB formats. Optional parameter on text file declaration sets buffer size (MS/PC-DOS & CP/M-86). Optional parameter on Reset/ReWrite sets (0d size for untyped files (MS/PC-DOS . Optional 4th parameter on Blockread/Write sets block size. Read and ReadLn work with array of char (MS/PC-DOS & CP/M-86). Seek procedure may take Real argument (MS/PC-DOS . SeekEoln function. SeekEof function. Truncate procedure (MS/PC-DOS . Misc. ----- ChDir procedure (MS/PC-DOS . Command line parameters on Options menu (MS/PC-DOS and CP/M-86). Delay procedure independent of processor speed (PC-DOS . Exit procedure. Extended graphics procedures & functions (see page 309 in manual for overview). GetDir procedure (MS/PC-DOS . MkDir procedure (MS/PC-DOS . Multiple EXTERNAL subprograms in one file (MS/PC-DOS & CP/M-86). Optional parameter on Halt to return error code (PC/MS-DOS). Ove moath procedure (MS/PC-DOS . OvrDrive procedure (CP/M). ParamCount function. ParamSkr function. RmDir procedure (MS/PC-DOS . Runs overlays in Memory mode (MS/PC-DOS & CP/M-86) Turtlegraphics procedures, functions, and constants (see page 309-310 in manual for overview). Overlays -------- Overlays can be run in Memory mode (MS/PC-DOS & CP/M-86). Overlay files are opened abetwlosed every time they are accessed. Therefore, there is never a need to specifically close an overlay file. The Y compiler directive is no longer supported. Instead, the OvrPath (MS-DOS MESr OvrDrive (CP/M) standard proce- dures may be used to specify the drive and subdirectory in which overlay files reside. ------------------- TURBO PASCAL Version 3.0 Additional File List In addition to the list of files mentioned in Chapter 1 of your TURBO Reference Manual, the following files are included on your TURBO disk: ACCESS3 BOX - for TOOLBOX users only: ACCESS.BOX update Sample programs --------------- LISTER PAS - simple program to list your Pascal source TURTLE PAS - demonstrates Turtlegraphics CMDLIN PAS - get parameters from the command line DIRECT PAS - demonstrates TURBO directory procedures ART PAS - sample graphics program COLOR PAS - sample color program SOUND PAS - sample sound program WINDOW PAS - demonstrates windowing INTRPTCL DOC - get the time from DOS DOSFCALL DOC - get the date from DOS EXTERNAL DOC - sample program using externals CALC PAS - sample spreadsheot program CALC HLP - spreadsheot help file CALCDEMO MCS - spreadsheot data file (not for use with TURBO-87) CALCMAIN PAS - extra program for compiling spreadsheot if necessary (please see note inside CALCMAIN.PAS) Special versions of TURBO ------------------------- These files will only be present on your disk if you have TURBO with one (or both MESf our extended real number packages. TURBO with 8087 Support ----------------------- TURBO-87 COM - TURBO PASCAL compiler with 8087 support HILB PAS - demonstrates increased speed and precision of TURBO-87 TEST PAS - demonstrates increased speed and precision of TURBO-87 TURBO with BCD Reals -------------------- TURBOBCD COM - TURBO PASCAL compiler with BCD reals BCD PAS - demonstrates increased precision of TURBOBCD --------------------------------------------------------------------- NOTE: The above applies to IBM PC and true compatibles only .