• Aucun résultat trouvé

Installing Turbo Pascal

Dans le document Turbo Tutor A Self-Study (Page 51-55)

Now that you have a system disk with Turbo Pascal on it, you are ready to install Turbo Pascal. By this we mean set up Turbo Pascal for your particular computer hardware so that it can work as efficiently as possible with your terminal or keyboard and display.

Turbo Pascal is designed to run on many different systems. Some of the files you copied to your working disk-TINST.COM, TINST.

MSG, and (on some versions) TINST.DTA-can help you install your version of Turbo Pascal. Once you're done, you can delete these files, since you won't need them anymore (unless you change your hardware configuratIon) .

If you're using an IBM PC or compatible (such as the Compaq®), chances are you can run Turbo Pascal without doing any installation at all. On the other hand, if you're running under CP/M, then you'll almost certainly have to run the installation program to tell Turbo Pascal how to display things on the screen.

Another reason you might want to run TINST is to change the editing commands used by Turbo PascaL The built-in editor uses commands similar to those found in WordS tar, a popular word-processing pro-gram. Chapter 6 covers the editor commands in detail; however, if you want to change any (or all) of the editing commands, TINSTwill help you. We've given you this option so that you can customize the editor commands to be the same as commands in other programs you frequently use.

One last reason to use TINST: If you're using PC-DOS or MS-DOS version 2.0 or later, and especially if you're using a hard disk, you can defme a path name for TURBO.MSG, the error message file. Let's say you've stored both TURBO. COM and TURBO.MSG in the directory C:\UTIL\PASCAL, and you're currently logged into the directory A:\SOURCE\PASCAL. If you run Turbo Pascal (using the command C:\UTIL\PASCAL\TURBO), Turbo will think that the error message file (TURBO. MSG) is in A:\SOURCE\PASCAL (the currently logged drive and directory).

However, if you've previously used TINST to defme the "Msg Path"

as C:\UTIL\PASCAL\TURBO.MSG, then there's no problem. (If you don't understand any of this, you probably don't use directories and don't need to worry about this.)

Using TINST With Non-IBM PC Systems

To install Turbo Pascal on a CP/M, CP/M-86, or generic MS-DOS system, insert your Turbo Pascal work disk into a drive (you don't need to do this if you have a hard disk), make that drive the default drive, log the drive in (CP/M and CP/M-86 systems only; see Appen-dix F), and type:

TINST IE)

to start the Turbo Pascal installation program. You will see a menu that looks like this:

Turbo Pascal Installation Menu.

Choose installation item from the following:

[Slcreen installation [Clommand installation [Qluit Enter S, C, or Q: _

While you may eventually want to perform the Command installation fllfictiofi (which changes the keys used to control the Turbo editor), for the moment you will only want to use the Screen installation function.

Press

W

to invoke this option.

TINST will respond by giving you a list of terminals and personal computers to choose from. It should look something like this:

Choose one of the following terminals:

If you see the name of your computer or terminal on this list, your job is simple: type the number corresponding to your computer/terminal, then press I~J

If you don't see the name of your terminal on this list, you must either find out which of the terminals listed is most similar to your terminal

Getting Ready to Use Turbo Pascal 33

or computer, or give TINST precise information about the special characters needed to control your particular screen.

Since it's much, much easier to find a terminal similar to yours on the list than to type in the required information, you may want to try the former approach first. Here are some guidelines to help:

• Frequently, the documentation that comes with a terminal will say that the terminal emulates another terminal (which may be on the list). If so, you can use the menu selection for the terminal your system emulates.

• If your terminal is a DEC™ (Digital Equipment Corp.) VT-I00, or emulates one, you can use the ANSI menu item. This item will also work on terminals described as "ANSI-compatible."

If your terminal is a DEC VT -52, or emulates one, use the Zenith menu selection. (The Zenith Data Systems® terminals use an enhanced version of the VT-52 command set.)

• If you see an item on the list that is not your terminal but is made by the same manufacturer, chances are the control characters will be the same. For instance, the DEC Rainbow computers use the same control characters as the DEC VT-l00 terminal (the ANSI menu selection). Try this menu selection and see if it works.

If all else fails, it is probably best to consult your local computer "guru"

for help. He or she may have to create a new item on the menu by selecting "None of the above" and entering the codes specific to your system, or she may be able to get information on which of the existing selections will work.

Appendix L, entitled "Installation," in the Turbo Pascal Reference Manual gives a complete description of how to respond to the questions asked by the "None of the above" selection. The "delete a definition" selec-tion on the menu is used to remove an undesired terminal definiselec-tion from TINST's file of terminal information. Since it never hurts to keep extra definitions around, you will rarely (if ever) need to use this option.

Once you have set the correct terminal type, the rest is easy. TINST will ask one more question:

Hardware dependent information

Operating frequency of your microprocessor in MHz (for delays): L;

Change to: _

Most CP/M-80 systems run at 4 MHz, so you can just press ~ to answer this question (indicating no change). If you have an especially old system, or if you have a high-speed system that uses the Z80B or Z80H microprocessor, you may need to specify a higher or lower number. CP/M-86 and MS-DOS systems run at various speeds. Refer

to the documentation that came with your computer if you are not sure (usually a section labeled "Specifications" will list the speed). (Note: It is not fatal, or even much of a problem, if this number is not specified correctly. It is used only to time delays in your programs.)

Now press !]J to exit TINST,'and you can begin to use Turbo.

Using TINST on the IBM PC and Compatible Systems

On the IBM PC and compatible systems, there is usually no reason to use TINST (at least at first), since Turbo is already configured to work on this system. However, you may want to use it if

• Your computer has a graphics display board that is not subject to

"snow." By using TINST, you may be able to improve your screen's performance (by telling Turbo Pascal that it can write to the screen without causing "snow").

• You want to change the editor commands. Since the Turbo editor uses the IBM PC's arrow and movement keys, it's unlikely that you will need to do this right away.

• You want to change the path Turbo uses to locate the file TURBO.

MSG. This is generally useful oIlly on hard disk systems \~!here

TURBO.MSG may reside in a different directory than the text of your program.

The procedures for doing each of these things are described in the Turbo Pascal Reference Manual (Appendix L, entitled "Installation").

Once you have installed Turbo, and are satisfied that it is working correctly (if you can follow the instructions in the next chapter, it is working correctly), feel free to delete all TINST files (TINST. *). This will free up space on your working disk. You can go back to your copy of the master disk if you need to use TINST again.

Additional Files

There are a number of other files that may also be on your working disk. You can keep them or delete them as you please. Here's a brieflist of them, with an explanation of what they do.

TURBO.MSG. This file contains the compiler error messages. If you delete this file, any error found during compilation will be identified only by a number. You must then look up the specific error in the Turbo Pascal Reference Manual (Appendix E, entitled "Compiler Error Messages"). We recommend you keep this file on your working disk until you absolutely must use the disk space for something more important.

TURBO.OVR. You'll see this file only if you're running under the CP/M-80 operating system. This file lets you execute programs from

Getting Ready to Use Turbo Pascal 35

within the Turbo Pascal menu system. If you delete this file, you'll have to exit to your operating system prompt to run programs. We recommend you keep this file unless disk space is a problem.

GRAPH.P and GRAPH.BIN. These files only appear in Turbo Pascal version 3.0 or later for the IBM PC. They have the declarations and object code for special graphics routines. Again, if you have enough disk space, keep them .

. PAS files. Your disk will contain several Turbo Pascal sample pro-grams. Some versions have more sample programs than others. At the very least, you will have the CALC files, which provide a complete source for a small spreadsheet program. These are good files to look at and play with. You might also want to print them for later study. You can delete them when you choose without affecting Turbo Pascal's operation.

READ.ME. This file has any updates, errata, notes, and so forth, that didn't get into the manual. This is another good file to print, after which you'll probably want to delete it.

Other files. There might be additional files on your disk. Some of these files are necessary for system operation (such as COMMAND.

COM on an MS-DOS system disk). If there are other files you don't feel you'll need, you can go ahead and delete them. If it turns out that you need them, you can retrieve them from one of the copies you made.

Dans le document Turbo Tutor A Self-Study (Page 51-55)