Multigraphics for Turbo Pascal & Borland Pascal
Total Page:16
File Type:pdf, Size:1020Kb
DATABITEN 0XOWL*UDSKLFV Version 2.2 Borland Pascal Turbo Pascal Program design: Lars Gustafsson Programming: Lars Gustafsson Hans Larsson (assembly coding), Olle Orlander (zooming, SVGA) Martin Fahlgren (FFE and parts of Pascal translation version 1.0) Text fonts: Karl Gustafsson (outline) and Lars Gustafsson Documentation: Lars Gustafsson English translation: Peter Campbell and Lars Gustafsson DATABITEN AB Mail address: Box 115, S-811 22 SANDVIKEN, SWEDEN Telephone: ++46-26-25 64 93 Telefax: ++46-26-25 36 41 Copyright 1990,1995 by DATABITEN AB. All rights reserved. MultiGraphics and SuperVisor are trademarks of DATABITEN AB. Other brand and product names are trademarks or registered trademarks of their respective holders. Introduction MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN Introduction 1 I N T R O D U C T I O N Introduction Welcome to the world of MultiGraphics - the most extensive graphics toolbox for Borland Pascal/Turbo Pascal ever! In the MultiGraphics manuals you will find detailed descriptions of all units and their constants, data types, variables, procedures and functions, etc, that make up the graphics capabilities of MultiGraphics. However, you are not advised to read the manuals in one go, but to keep the manuals as a reference close to your computer. The manuals have been arranged and organized on the basis of the units that are included in MultiGraphics. After you have read this introduction, installed the software and read the READ.ME file on one of the distribution disks, we recommend you to take a look at Reference 1, "Let's Draw". License conditions The license terms for MultiGraphics give you the right to use units and drivers from MultiGraphics in all applications you use for your own per- sonal use. You may make copies of the original disks for your own backup purposes, but you are not allowed to make any copies of the printed documentation. Further, the MultiGraphics license gives you the right to freely distribute compiled applications (EXE files) that use MultiGraphics and its supplied drivers and fonts. You are allowed, moreover, to distributed drivers (files of MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN 2 Introduction the MGV, MGA, MGH, XGV, XGA and XGH types) and font files with compiled applications. You are allowed to distribute uncompiled programs or program units that use units and/or drivers in MultiGraphics provided that no units or drivers from MultiGraphics are supplied with them. The license conditions stated above are binding, even without a signature, and are a condition for the validity of purchase. You are not allowed, on the other hand, to distribute programs that use MultiGraphics or its drivers if you have not signed and returned the license agreement. The Demo Version of MultiGraphics may only be used for evalutation purposes. The MultiGraphics Demo Version The Demo version of MultiGraphics is contained in the compressed file MGTPDEMO.ZIP. Create a new directory, for example C:\MG, and make a copy of MGTPDEMO.ZIP in this directory. Then use the PKUNZIP.EXE utility to uncompress the MultiGraphics demo files. After unpacking locate the file named READ.ME This is a very important text file with information on the Demo version, not mentioned in this documentation. Please read it! You can now skip the information on the Commercial Version and continue with the "Compiler Recommendations" section later in this introduction. The MultiGraphics Commercial Disks MultiGraphics is usually delivered on 3.5" 1.44 MB disks. No matter what the format, the disks contain a number of compressed files, each one of which in turn contains a number of other files. The compressed files must first be unpacked before you can access the individual files in MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN Introduction 3 MultiGraphics. The compressed files have the file type '.EXE' and unpack themselves, i.e., by executing the compressed file, the individual files it contains are created simultaneously. READ.ME Important text file with the latest news. Read it! MGIFC.EXE This is a compressed file with interface sections to all Pascal units in MultiGraphics. They are not needed when compiling programs but do add valuable information about each device. MGTPUxx.EXE MGTPU70.EXE, MGTPU60.EXE etc. are compressed files containing MultiGraphics TPU files for Borland Pascal/Turbo Pascal version x.x and real mode. These TPU files are mandatory when you compile graphics app- lications for real mode. Unpack the files to your special TPU directory or specific MultiGraphics directory. You only need to unpack the TPU files for your current Turbo Pascal/Borland Pascal version. Borland Pascal 7.0 and Turbo Pascal 7.0 share the same TPU's in MGTPU70.EXE. MGTPPxx.EXE Compressed files containing MultiGraphics TPP files for Borland Pascal version x.x and protected mode. These TPP files are mandatory when you compile graphics applications for protected mode. Unpack the files to your special TPP directory or specific MultiGraphics directory. Borland Pascal version 7.01 or later is required! MGDBUG70.EXE Compressed file containing TPU and TPP files (MGErr, MGDebug, MGEv, MGMouse) compiled with heap surpervising and events logging activated. These debug versions files can only be used with Turbo Pascal MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN 4 Introduction 7.0 and Borland Pascal 7.0. Unpack these files to a separate directory - different from the directory where the standard MultiGraphics TPU's and TPP's reside! Se Appendix "MGDebug - Debugging" for more information. Also stores the source code of the unit MGDebug. You will only need this if you wish to compile MGDebug with debug information. MGDRVR.EXE This is a compressed file containing all the MultiGraphics drivers for real mode supporting a wide range of graphics devices. You'll need them when loading drivers dynamically from graphics applications. Unpack the drivers to your directory with executable files. The drivers have file extensions ".MGA", ".MGH" or ".MGV". MGDRVX.EXE This is a compressed file containing all the MultiGraphics drivers for pro- tected mode supporting a wide range of graphics devices. You'll need them when loading drivers dynamically from graphics applications in protected mode. Unpack the drivers to your directory with executable files. The drivers have file extensions ".XGA", ".XGH" or ".XGV". MGFONTS.EXE This is a compressed file with loadable fonts. Unpack to the same directory as the graphics device drivers. MGGA.EXE This is a compressed file with all the examples and demo programs ("Graphics Applications"). The example programs are important comple- ments to the printed documentation and it is strongly recommended that you unpack and try out these programs. Some examples also require that the images in MGPCX are unpacked. MGPCX.EXE This is a compressed file with PCX images. They are used by some examp- le programs. MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN Introduction 5 Installation All compressed files are EXE files and unpack themselves in the current directory when they are executed. Where the compressed files have a ver- sion number, you should only unpack those files that correspond to the Borland Pascal/Turbo Pascal version you are using. Here is an example: Suppose your current directory is C:\BP\UNITS. The MultiGraphics disk is placed in drive A:. By using the commands: A:MGTPU70 <Enter> A:MGTPP70 <Enter> all files in MGTPU70.EXE and MGTPP70.EXE are unpacked and placed in the C:\BP\UNITS directory. Compiler Recommendations MultiGraphics applications must always be compiled with the floating point emulation activated (this is set using the Options Compiler menu or with the compiler directive $E+). Graphics applications are often very demanding on memory during compi- lation and execution. If you follow our suggestions given below, you will avoid the risk of frustration: ¨ Whenever possible, use the Borland Pascal's BP.EXE environmenth has the advantage of using the whole of RAM. ¨ Set target to protected mode whenever possible. This will give your applications a maximum of accessible memory. ¨ Applications compiled for protected mode must have access to the files DPMI16.OVLd RTM.RESe the Borland Pascal documentation). If you choose to work with Borland Pascal's or Turbo Pascal's TURBO.EXEompile to disk - not to memory! (set using Alt-C D) ¨ Place the link buffer on disk - not in memory! (set using Alt-O L L) MultiGraphics & Borland Pascal/Turbo Pascal DATABITEN 6 Introduction ¨ Split the library file TURBO.TPL into its individual TPU files. See the documentation about TPUMOVER in the Borland Pascal and Turbo Pascal manuals. ¨ Using EMS memory, frees memory from the program editor. ¨ Clear memory from unnecessary memory resident programs. Combine this measure by using a memory manager such as EMM386 in DOS 5.0 or 6.x, 386-MAX from Qualitas or QEMM from QuarterDeck. The Reference Manuals The reference manuals are divided into three sections, namely: ¨a Reference section that starts with a short tutorial chapter and then describes the individual units in MultiGraphics, ¨a Device Driver section that describes the details of all device drivers and finally, ¨ an Appendix with lists of error messages, fonts and documentation on virtual memory handling and emulation of the Borland Graphics Interface (BGI), etc. Each section is divided into several chapters. The Reference chapters are numbered 1, 2, 3 etc., the Device Driver chapters are numbered D1, D2, D3, etc. and the Appendices are "numbered" A, B, C, etc.. Each chapter has pages numbered from 1 and upwards. Consequently, the index looks like the following: 4-8 chapter 4, page 8 in the Reference section, D4-8 chapter D4, page 8 in the Device Driver section and D-8 appendix D, page 8 in the Appendix section. The Borland Pascal/Turbo Pascal version does not include chapter 16 "MG - Concurrent Graphics Processes", which describes the multi-tasking sup- port in MultiGraphics when using the TopSpeed Modula-2, C or C++ compilers.