home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / pascal-p / pp319doc.lbr / TRANSLAT.MZN / TRANSLAT.MAN
Encoding:
Text File  |  1987-02-03  |  6.5 KB  |  153 lines

  1. .macro chttl = The Translation Process
  2. .ch .chttl
  3. .hl 1 Translation Steps
  4. Pascal  source  programs are translated into runable programs in  two  or
  5. more steps shown schematically below (The PCODE is legible text in a
  6. _.TIC file):
  7.  
  8. PCD interpreters (no intrinsic procedures or segmentation):
  9. .asis
  10.  
  11.    SOURCE----->PCODE----->PCD=PROGRAM
  12.            !          !
  13.         PASCALP    ASSMPCD
  14.  
  15. !
  16. PCD interpreters (intrinsic procedures or segmented):
  17. .asis
  18.  
  19.    SOURCE----->PCODE----->RBMFILE(s)----->PCD=PROGRAM
  20.            !          !               !
  21.         PASCALP    ASSMPCD          LINKER
  22.  
  23. !
  24. 8080 Native code:
  25. .asis
  26.  
  27.                                     LIBRARY----\
  28.    SOURCE----->PCODE----->ASSY------>SLRFILE------>PROGRAM
  29.            !          !          !             !
  30.         PASCALP    ASSMAP      SLRMAC        SLRNK
  31.  
  32. !
  33. HP3000 (native code):
  34. .asis
  35.  
  36.    SOURCE----->PCODE----->SPL----->USL----->PROGRAM
  37.            !          !        !        !
  38.         PASCALP    ASSMSPL    SPL    SEGMENTER
  39.  
  40. !
  41. .note On File Sizes
  42. You can expect _.TIC files to be roughly the same size as the Pascal
  43. source files.  For _.COM generation the _.MAC file will usually be 
  44. about 3 to 4 times the size of the _.TIC file.
  45.  
  46. .hl 1 The Compiler Header, .bb showing files used
  47. PASCALP (source, list,prr, ef, input, output) [parm] .eb .b
  48. PascalP may be operated directly by making the appropriate substitutions in
  49. the program header.  The pre-defined jobs below combine compiler and assembly
  50. execution into one command, .bb and .eb are normally most convenient.  A useful 
  51. specification of source is "CON", which allows entry of options and inclusion
  52. of the main program, for example:
  53.  
  54. .i 10 (*$n-,d-,i'yourprog.pas'*) .b
  55. to suppress line numbers and run-time checks when compiling "yourprog.pas".
  56. This type of operation avoids any editing of source files.  See the "x" option
  57. under Compiler Switches, for a mechanism to set options in specific program
  58. areas without affecting the overall option settings.  Similar "stub" files
  59. may be defined for convenient compilation with various modes set.
  60.  
  61. .hl 1 Pre-defined Jobs
  62. Under CPM the submit files COMPILE.JOB,  PASCPCD.JOB and
  63. .bb PASCPREP.JOB capture the complete (compilation assembly linkage)
  64. process into one command. .eb COMPILE.JOB simplifies entry  to  one
  65. filename.
  66.  
  67. .note NOTE
  68. "JOB"  is similar to the standard CPM "SUBMIT"  utility,   but  allows
  69. nested jobs,  interactive entry, execution with any default drive assignments,
  70. specification of default parameters,  uses the comma as a parameter delimiter,
  71. and  allows "quoted string" parameters.   It will also perform the same  drive
  72. searches  as  the  overall  Pascal  file system.   It  is  an  enhancement  of
  73. "SUPERSUB".
  74. .res
  75. .hl 1 Compilation Commands
  76. Using the supplied programs and job streams simplified compilation commands
  77. are available.
  78. .tp 9 .hl 2     CPM:   Typical commands are:
  79. .i 10            A>JOB PASCPCD source list object scratch .b
  80. .i 20               (where scratch and object may be identical) .cr
  81.      or .cr
  82. .i 10            A>JOB COMPILE source####_<_<with no extension>> .cr
  83.  
  84. .hl 1 Options
  85. A  number of options have been added .bb to control the compilation process.
  86. .eb These options are specified
  87. by  PARM  values in the command.   Multiple options may  be  specified  by
  88. adding  the  corresponding values.   (Under CPM parm is a number enclosed  by
  89. "[]" outside the fileparameter section of the command line.)
  90. .rem use .res after .itemize area
  91. .macro itemize = .sav .tabs 5 15 .p -10 1 5 .lm 15 .rm $$rm-5;
  92. .tp 8  .itemize
  93. .pp  PARM .t  Meaning
  94. .pp  2   .t   Generate procedure tracing code
  95. .pp  4   .t   Continue after compiler errors/warnings
  96. .pp  8   .t   Cross-compile (16 bit on 8 or 8 on 16 bit machines)
  97. .res
  98.  
  99. .hl 2 Under CPM
  100. If no "8" bit is set code for an 8 bit machine (Pcd interpreter or 8080
  101. native code) is generated.  The following apply:
  102. .itemize
  103. .pp  16 .t Force a relocatable PCD file. (Programs with neither intrinsics,
  104. externals, nor segmentation will normally generate an executable PCD file,
  105. which cannot be linked to external procedures.
  106. .pp 64 .t For _.PCD generation, over-ride segmentation commands and force
  107. generation of a single segment code file.  For _.COM generation, cause the
  108. intermediate assembly source file to be generated in Zilog rather than
  109. Intel mnemnonics.  This increases the file size by about 10%.
  110. .pp  128 .t Echo the compiler listing on the TIC (temporary intermediate code)
  111. file for subsequent listing during the assembly phase.  This option greatly
  112. enlarges the TIC file size.  If converted to executable PCD via ASSMPCD
  113. a complete listing can be extracted on "codelist" file.  See the job file
  114. PASCPCD.JOB, which installs all these options.  Similarly, if converted to
  115. assembly source with ASSMAP, the original compilation listing appears as
  116. comments.
  117. .res
  118.  
  119. .bb .hl 2 Under other systems (e.g. HP3000)
  120. Slightly different conventions apply.  Omitted from this manual.
  121. .eb
  122. .hl 2 Procedure Tracing
  123. Compiled programs normally do not contain procedure tracing messages.  If
  124. procedure tracing is desired use the "2" bit option,  and run the program with
  125. an  odd value of PARM specified.   Messages of the form "ENTER  procedurename"
  126. and  "EXIT  procedurename" will be generated automatically. .bb  At present
  127. this feature  is  suppressed, because most systems cannot conveniently supply
  128. sense switches for control, however custom interpreters can be supplied which
  129. enable the feature. .eb
  130. The messages are indented to reflect the dynamic 
  131. procedure level.  Therefore messages from recursive 
  132. procedures may disappear to the right.
  133.  
  134.  
  135. .hl 2 Where options take effect
  136. Of  the above "bit" options,  only the 4,  8 and 128 bits (no  error  job
  137. aborts,  byte  object machine,  and echo listing on P-Code file) are  directly
  138. implemented on the compiler.   The remaining options are passed to the various
  139. assembly programs which generate final code.
  140.  
  141. .note    Microsoft _.REL format
  142. While it is possible to use this format, it is not supported because
  143. a: Names are limited to 6 characters, and extremely confusing errors
  144. can result from name collisions; b: The LIB80 program is unreliable,
  145. and loses portions of large libraries, thus making maintenance of
  146. PASCLIB.REL impracticable.
  147.  
  148. SLR Systems format and librarian avoids all these problems, and is
  149. also an order of magnitude faster.  Unfortunately the SLR programs
  150. will only execute under Z80 processors (while the PascalP system
  151. can execute under 8080, 8085, and v20 processors).
  152. .res
  153. )b