home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / DIXON.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  7.6 KB  |  240 lines

  1. IBM Pascal Compiler Version 2.00
  2.  
  3.            Carrington Dixon
  4.               North Texas
  5.    IBM Personal Computer User Group
  6.  
  7. My upgrade of the IBM Pascal Compiler
  8. arrived a few days ago. Most, if not
  9. all, of the bugs in Version 1.00 have
  10. been fixed and a number of
  11. significant new capabilities have
  12. been added.
  13.  
  14. The first thing one notices is that
  15. the documentation has nearly doubled!
  16. Where the original version required
  17. only one binder to hold its four
  18. hundred odd pages, the new version
  19. requires two binders:  "Pascal
  20. Compiler Fundamentals" and "Pascal
  21. Compiler Language Reference". Each is
  22. the size of the original document.
  23. The latter supplies an alphabetically
  24. arranged discussion of all the
  25. reserved words, functions and
  26. metacommands for IBM Pascal.  The
  27. former supplies a topical discussion
  28. of many features, much as the
  29. original did, and gives instructions
  30. for executing the compiler, linker
  31. and the library manager.
  32.  
  33. New with this version is support for
  34. the 8087 chip, double precision
  35. arithmetic and long integers (32
  36. bit). Programs now can address up to
  37. 640KB of memory via the long heap
  38. management routines. Single level
  39. code overlays are supported as are
  40. DOS 2.x pathnames (both at compile
  41. time and at runtime). Data structures
  42. now can be as large as 64KB. The
  43. internal floating point format has
  44. been changed for reasons of 8087
  45. compatibility.
  46.  
  47. Because of the many different options
  48. that may be required, Pascal no
  49. longer comes with a ready-to-use
  50. object library. IBM supplies a SETUP
  51. procedure that makes installing
  52. Pascal relatively painless. There are
  53. two choices of DOS interface
  54. routines: DOS 1.1 and DOS 2.0.  The
  55. former will produce files that can
  56. run under DOS 1.1 or DOS 2.x but will
  57. not support pathnames under 2.x. The
  58. latter supports pathnames but will
  59. not run under DOS 1.1 at all.
  60.  
  61. There are three choices of math
  62. routines: 8087ONLY, REGMATH, and
  63. EMULATOR. As the names imply, the
  64. first choice will produce files that
  65. require the 8087 chip for execution;
  66. the second will produce results in a
  67. precision that is comparable to the
  68. old Pascal; and EMULATOR is for the
  69. undecided. These math routines will
  70. use the 8087, if available, and will
  71. produce the largest EXE files of the
  72. three choices and run slower than the
  73. REGMATH routines on machines without
  74. an 8087 chip (the higher precision
  75. costs). Note that this configuration
  76. is made once at installation time and
  77. need not be repeated every time the
  78. linker is run. All of this is made
  79. possible by the Library Manager, a
  80. program that has been available from
  81. Microsoft for nearly a year but is
  82. making its first appearance in an
  83. official IBM version. This utility
  84. can create object libraries and
  85. update existing ones. Object modules
  86. can be added, deleted or replaced on
  87. existing libraries. A cross-reference
  88. listing of a library can be
  89. generated¼ anΣ aε objec⌠ modulσ can
  90. be extracted from the library and
  91. placed into its own .OBJ file. This
  92. capability is extremely welcome as it
  93. was awkward to build a program from a
  94. number of separately compiled modules
  95. without it.
  96.  
  97. A new version of the linker program,
  98. 2.20, is included on the library
  99. diskette. This version supports
  100. single level overlays and program
  101. sizes of up to 1 megabyte. There is
  102. no new linker directive to support
  103. overlays. Instead object modules to
  104. be placed in overlay are
  105. pre-processed with the MKOVL.COM
  106. program.  The overlay loader
  107. PLOADER.OBJ is then included before
  108. the main program in the LINK command
  109. line. Each overlay is brought in
  110. explicitly by calls to the LOADER
  111. function from the main program. The
  112. Reference Manual has a rather lengthy
  113. example of this for those who may
  114. need the capability. This feature
  115. works only for programs that run
  116. under DOS 2.x; it will not work under
  117. DOS 1.1.
  118.  
  119. Several bugs and short-comings of the
  120. original Pascal Compiler have been
  121. fixed in this release. The bug where
  122. the sine function returned incorrect
  123. values for negative angles has been
  124. fixed. It is no longer necessary to
  125. run CHKDSK to recover disk space
  126. after the compiler has terminated
  127. because of some error in the source
  128. code. The compiler and linker now set
  129. ERRORLEVEL so that batch files can
  130. check for compile errors. (You can
  131. even set ERRORLEVEL from your Pascal
  132. program, if you happen to stumble
  133. pAacross the documentation on how to do
  134. it, hint: see page 4-7). The default
  135. for the DEBUG compiler metacommand
  136. has been changed from ON to OFF.
  137.  
  138. I have not had a chance to recompile
  139. any major programs, yet. I dug out my
  140. old sine test program (which
  141. demonstrated the old SIN error) and
  142. ran it through both compilers. I used
  143. the REGMATH library and set DEBUG to
  144. OFF in the source file to produce
  145. something like apples-to-apples
  146. comparisons. This program does little
  147. more than print out the values for
  148. SIN and COS for every 0.5 radian
  149. between -10 and 10 radians. The
  150. results are:
  151.  
  152.          Version 1.00  Version 2.00
  153.  
  154. Compile time     40 sec        44 sec
  155. Link time   1 min 4 sec  1 min 24 sec
  156. OBJ size      938 bytes     994 bytes
  157. EXE size    32384 bytes   31046 bytes
  158. Run time         22 sec         7 sec
  159.  
  160. This is more a measure of the speed
  161. of the new math routines than of the
  162. generated code. Still, this kind of
  163. speed up is very impressive.
  164.  
  165. The BYTE 'Sieve of Eratsthenes' test
  166. from the January 1983 issue gives a
  167. slightly different picture of the two
  168. compilers:
  169.  
  170.         Version 1.0    Version 2.0
  171.  
  172. Compile time     40 sec        44 sec
  173. Link  time       50 sec        51 sec
  174. OBJ size      816 bytes     867 bytes
  175. EXE size    32512 bytes   26966 bytes
  176. Run time         17 sec        16 sec
  177. pò
  178. All these times are from the Norton
  179. TIMEMARK utility and thus include the
  180. load time from a floppy disk.  The
  181. difference in the link and run times
  182. are within the variation that one
  183. might expect from one run to another;
  184. that is, no measurable speed
  185. difference. The significant
  186. improvement here is in the EXE file
  187. size.
  188.  
  189. The new documentation for Pascal is
  190. not only larger, it is better; IBM
  191. has added a number of examples.
  192. There is even an explanation of how
  193. to use the DOSXQQ function; that was
  194. left as an exercise to the user last
  195. time. There are still a few
  196. oversights and omissions (like the
  197. setting of ERRORLEVEL mentioned
  198. above) but your chances of finding
  199. the information you want and of
  200. understanding it once you have found
  201. it are very much improved.
  202.  
  203. Although the compiler can produce
  204. code that will execute on any
  205. supported configuration of PC, the
  206. compiler itself will only run under
  207. DOS 2.x, and it requires at least
  208. 192KB of memory. The manual suggests
  209. that object modules created by the
  210. version 1.00 compiler should not be
  211. linked with those created by the new
  212. compiler.  They include the FILKQQ
  213. and FILUQQ modules. The INC module
  214. has been replaced by FINK.INT and
  215. FINU.INT; so, modules that included
  216. them will have to be changed before
  217. they will compile. The internal
  218. representation of floating point
  219. numbers has changed; so, binary data
  220. files that contain floating point
  221. numbers cannot be passed between
  222. programs compiled under the different
  223. versions. Documentation on the Unit U
  224. function calls and the detailed FCB
  225. are no longer included as IBM
  226. recommends that these interfaces not
  227. be used.
  228.  
  229. The list price for the new compiler
  230. is $350. For a limited time, owners
  231. of version 1.00 can order the upgrade
  232. from IBM for $100; your Authorized
  233. Dealer has the forms for that right
  234. now.
  235.  
  236. [Editor's note: A complete product
  237. announcement of the new Pascal
  238. version 2.0 appeared in the April
  239. aissue of Exchange.]
  240.