home *** CD-ROM | disk | FTP | other *** search
- IBM Pascal Compiler Version 2.00
-
- Carrington Dixon
- North Texas
- IBM Personal Computer User Group
-
- My upgrade of the IBM Pascal Compiler
- arrived a few days ago. Most, if not
- all, of the bugs in Version 1.00 have
- been fixed and a number of
- significant new capabilities have
- been added.
-
- The first thing one notices is that
- the documentation has nearly doubled!
- Where the original version required
- only one binder to hold its four
- hundred odd pages, the new version
- requires two binders: "Pascal
- Compiler Fundamentals" and "Pascal
- Compiler Language Reference". Each is
- the size of the original document.
- The latter supplies an alphabetically
- arranged discussion of all the
- reserved words, functions and
- metacommands for IBM Pascal. The
- former supplies a topical discussion
- of many features, much as the
- original did, and gives instructions
- for executing the compiler, linker
- and the library manager.
-
- New with this version is support for
- the 8087 chip, double precision
- arithmetic and long integers (32
- bit). Programs now can address up to
- 640KB of memory via the long heap
- management routines. Single level
- code overlays are supported as are
- DOS 2.x pathnames (both at compile
- time and at runtime). Data structures
- now can be as large as 64KB. The
- internal floating point format has
- been changed for reasons of 8087
- compatibility.
-
- Because of the many different options
- that may be required, Pascal no
- longer comes with a ready-to-use
- object library. IBM supplies a SETUP
- procedure that makes installing
- Pascal relatively painless. There are
- two choices of DOS interface
- routines: DOS 1.1 and DOS 2.0. The
- former will produce files that can
- run under DOS 1.1 or DOS 2.x but will
- not support pathnames under 2.x. The
- latter supports pathnames but will
- not run under DOS 1.1 at all.
-
- There are three choices of math
- routines: 8087ONLY, REGMATH, and
- EMULATOR. As the names imply, the
- first choice will produce files that
- require the 8087 chip for execution;
- the second will produce results in a
- precision that is comparable to the
- old Pascal; and EMULATOR is for the
- undecided. These math routines will
- use the 8087, if available, and will
- produce the largest EXE files of the
- three choices and run slower than the
- REGMATH routines on machines without
- an 8087 chip (the higher precision
- costs). Note that this configuration
- is made once at installation time and
- need not be repeated every time the
- linker is run. All of this is made
- possible by the Library Manager, a
- program that has been available from
- Microsoft for nearly a year but is
- making its first appearance in an
- official IBM version. This utility
- can create object libraries and
- update existing ones. Object modules
- can be added, deleted or replaced on
- existing libraries. A cross-reference
- listing of a library can be
- generated¼ anΣ aε objec⌠ modulσ can
- be extracted from the library and
- placed into its own .OBJ file. This
- capability is extremely welcome as it
- was awkward to build a program from a
- number of separately compiled modules
- without it.
-
- A new version of the linker program,
- 2.20, is included on the library
- diskette. This version supports
- single level overlays and program
- sizes of up to 1 megabyte. There is
- no new linker directive to support
- overlays. Instead object modules to
- be placed in overlay are
- pre-processed with the MKOVL.COM
- program. The overlay loader
- PLOADER.OBJ is then included before
- the main program in the LINK command
- line. Each overlay is brought in
- explicitly by calls to the LOADER
- function from the main program. The
- Reference Manual has a rather lengthy
- example of this for those who may
- need the capability. This feature
- works only for programs that run
- under DOS 2.x; it will not work under
- DOS 1.1.
-
- Several bugs and short-comings of the
- original Pascal Compiler have been
- fixed in this release. The bug where
- the sine function returned incorrect
- values for negative angles has been
- fixed. It is no longer necessary to
- run CHKDSK to recover disk space
- after the compiler has terminated
- because of some error in the source
- code. The compiler and linker now set
- ERRORLEVEL so that batch files can
- check for compile errors. (You can
- even set ERRORLEVEL from your Pascal
- program, if you happen to stumble
- pA across the documentation on how to do
- it, hint: see page 4-7). The default
- for the DEBUG compiler metacommand
- has been changed from ON to OFF.
-
- I have not had a chance to recompile
- any major programs, yet. I dug out my
- old sine test program (which
- demonstrated the old SIN error) and
- ran it through both compilers. I used
- the REGMATH library and set DEBUG to
- OFF in the source file to produce
- something like apples-to-apples
- comparisons. This program does little
- more than print out the values for
- SIN and COS for every 0.5 radian
- between -10 and 10 radians. The
- results are:
-
- Version 1.00 Version 2.00
-
- Compile time 40 sec 44 sec
- Link time 1 min 4 sec 1 min 24 sec
- OBJ size 938 bytes 994 bytes
- EXE size 32384 bytes 31046 bytes
- Run time 22 sec 7 sec
-
- This is more a measure of the speed
- of the new math routines than of the
- generated code. Still, this kind of
- speed up is very impressive.
-
- The BYTE 'Sieve of Eratsthenes' test
- from the January 1983 issue gives a
- slightly different picture of the two
- compilers:
-
- Version 1.0 Version 2.0
-
- Compile time 40 sec 44 sec
- Link time 50 sec 51 sec
- OBJ size 816 bytes 867 bytes
- EXE size 32512 bytes 26966 bytes
- Run time 17 sec 16 sec
- pò
- All these times are from the Norton
- TIMEMARK utility and thus include the
- load time from a floppy disk. The
- difference in the link and run times
- are within the variation that one
- might expect from one run to another;
- that is, no measurable speed
- difference. The significant
- improvement here is in the EXE file
- size.
-
- The new documentation for Pascal is
- not only larger, it is better; IBM
- has added a number of examples.
- There is even an explanation of how
- to use the DOSXQQ function; that was
- left as an exercise to the user last
- time. There are still a few
- oversights and omissions (like the
- setting of ERRORLEVEL mentioned
- above) but your chances of finding
- the information you want and of
- understanding it once you have found
- it are very much improved.
-
- Although the compiler can produce
- code that will execute on any
- supported configuration of PC, the
- compiler itself will only run under
- DOS 2.x, and it requires at least
- 192KB of memory. The manual suggests
- that object modules created by the
- version 1.00 compiler should not be
- linked with those created by the new
- compiler. They include the FILKQQ
- and FILUQQ modules. The INC module
- has been replaced by FINK.INT and
- FINU.INT; so, modules that included
- them will have to be changed before
- they will compile. The internal
- representation of floating point
- numbers has changed; so, binary data
- files that contain floating point
- numbers cannot be passed between
- programs compiled under the different
- versions. Documentation on the Unit U
- function calls and the detailed FCB
- are no longer included as IBM
- recommends that these interfaces not
- be used.
-
- The list price for the new compiler
- is $350. For a limited time, owners
- of version 1.00 can order the upgrade
- from IBM for $100; your Authorized
- Dealer has the forms for that right
- now.
-
- [Editor's note: A complete product
- announcement of the new Pascal
- version 2.0 appeared in the April
- aissue of Exchange.]