home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 01e / m2comp_b.zip / FMODULA2.DOC < prev    next >
Text File  |  1987-07-06  |  70KB  |  2,509 lines

  1.  
  2.  
  3.                                 Modula-2 Compiler
  4.  
  5.                     (C) Copyright 1987 Fitted Software Tools.
  6.                               All rights reserved.
  7.  
  8.  
  9.  
  10.                               Fitted Software Tools
  11.                                  P.O.Box 956129
  12.                                 Duluth, Ga 30136
  13.  
  14.           
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                              DISCLAIMER OF WARRANTY
  26.  
  27.           THIS SOFTWARE AND MANUAL  ARE  PROVIDED  "AS IS" AND WITHOUT
  28.           WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY.
  29.  
  30.           THIS  SOFTWARE  IS  PROVIDED WITHOUT ANY EXPRESS OR  IMPLIED
  31.           WARRANTIES  WHATSOEVER.   BECAUSE   OF   THE   DIVERSITY  OF
  32.           CONDITIONS  AND  HARDWARE  UNDER WHICH THIS SOFTWARE MAY  BE
  33.           USED, NO WARRANTY OF FITNESS  FOR  A  PARTICULAR  PURPOSE IS
  34.           OFFERED.   THE  USER  IS  ADVISED  TO  TEST  THIS   SOFTWARE
  35.           THOROUGHLY  BEFORE  RELYING ON IT. THE USER MUST ASSUME  THE
  36.           ENTIRE RISK OF USING THIS SOFTWARE.
  37.  
  38.           
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.           IBM is  a  registered  trademark  of  International Business
  50.           Machines Corporation.
  51.  
  52.           
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                       - 1 -
  63.           
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.                                     Chapter 1
  75.  
  76.                                   Introduction
  77.  
  78.  
  79.  
  80.           Thank you for your interest in our Modula-2 compiler. 
  81.  
  82.           This system features a  Modula-2 compiler with an integrated
  83.           editor and "make" facility,  a  program  linker,  a makefile
  84.           generator, and an execution profiler. 
  85.  
  86.           The compiler generates code for the Intel 8086 "huge" memory
  87.           model: Each  module  has its own data and code segment, each
  88.           of  which can be up to 64k in size; pointers are four  bytes
  89.           long.  More restrictive  memory  models  are  not  currently
  90.           supported. 
  91.  
  92.           All the library and runtime support source code is  provided
  93.           to our registered users (see Shareware).
  94.  
  95.           We hope  that  our  effort  will prove itself worthy of your
  96.           support. 
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.           Introduction                                               2
  129.           
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.           1.1 Hardware requirements
  139.  
  140.  
  141.           This system will run on IBM PC, PC/AT, or compatible systems
  142.           with at least 512K  of  RAM,  two  double  sided floppy disk
  143.           drives and  a  monochrome  display  adapter,  color graphics
  144.           adapter or equivalent. 
  145.  
  146.           For best performance, a  hard  disk  and  640K  of  RAM  are
  147.           recommended. 
  148.  
  149.           
  150.  
  151.  
  152.  
  153.  
  154.           1.2 Software requirements
  155.  
  156.  
  157.           This system will run under DOS version 2.0 or later. 
  158.  
  159.           No other software is required to  use  this  system, but you
  160.           will need an assembler if you intend to modify  one  of  the
  161.           runtime  support modules: M2Reals (floating point  support),
  162.           M2Longs (LONG arithmetic) or M2Procs (coroutine handling). 
  163.  
  164.           
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.           Introduction                                               3
  195.           
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                                     Chapter 2
  207.  
  208.                               Software installation
  209.  
  210.  
  211.  
  212.  
  213.           2.1 Theory
  214.  
  215.  
  216.           The  library  module  Terminal  requires that  the  ANSI.SYS
  217.           driver be installed. 
  218.  
  219.           The executable files  (MC.EXE,  M2LINK.EXE, ...) should, for
  220.           ease of operation, be placed  in  a drive/directory named in
  221.           the DOS PATH variable. 
  222.  
  223.           The  editor  configuration file M2ED.CFG must be  accessible
  224.           through the DOS PATH variable. 
  225.  
  226.           Both the compiler and the linker will  use  the  environment
  227.           variable  M2LIB  to  locate  required  library modules  (the
  228.           format for the M2LIB entry matches that of the DOS PATH).
  229.  
  230.           The compiler and utilities in this  package do not keep many
  231.           files  open simultaneously.  If you set the FILES  parameter
  232.           in CONFIG.SYS to 10  you should not encounter any problems. 
  233.           For  performance  considerations,  you should also  allocate
  234.           more  than the default number of buffers for DOS: If you are
  235.           running on a PC class machine, try allocating 20 buffers  in
  236.           your CONFIG.SYS. On an AT type machine, try 64 buffers. 
  237.  
  238.           Example CONFIG.SYS:
  239.  
  240.                DEVICE=ANSI.SYS
  241.                FILES=10
  242.                BUFFERS=20
  243.  
  244.           This  compiler is a memory hog (you heard it here  first!). 
  245.           Therefore, unless you have 640k of memory installed  in your
  246.           system, you should have  COMMAND.COM  available  for  reload
  247.           once you exit the compiler. 
  248.  
  249.           If you have 640k of memory, you will probably want to enable
  250.           the "COMMAND save" feature of the compiler, which will  stop
  251.           it from clobbering the resident portion of COMMAND.COM. Just
  252.           add the following line to your AUTOEXEC.BAT file:
  253.  
  254.                SET CMDSIZE=NN
  255.  
  256.           where NN is the size of  the resident portion of COMMAND.COM
  257.  
  258.  
  259.  
  260.           Software installation                                      4
  261.           
  262.  
  263.  
  264.  
  265.  
  266.           in K (18 for DOS 3.0).
  267.  
  268.           MC clobbers the top of the memory space  available  for  use
  269.           during initialization.  Therefore, to  find  out the size of
  270.           the  resident  portion  of  COMMAND.COM  try  the  following
  271.           procedure:  start  by  setting   CMDSIZE   to  the  size  of
  272.           COMMAND.COM. If  now  you execute MC, exit it, and press the
  273.           F3 key,  DOS will still remember your MC command.  Decrement
  274.           CMDSIZE and retry the MC test until the system forgets  your
  275.           last command (COMMAND.COM had to be reloaded). 
  276.  
  277.           
  278.  
  279.  
  280.  
  281.  
  282.           2.2 Recommended setup for a system with 2 floppy drives
  283.  
  284.  
  285.           This  whole  system  is  too  large  to fit in a single 360k
  286.           floppy.   Therefore,  it  is  recommended  that you build  a
  287.           "compiler" floppy and a  "utilities" floppy (you may combine
  288.           them both in a 720k or 1.2Mb floppy). 
  289.  
  290.           On the compiler floppy, place the compiler (MC.EXE), all the
  291.           library definition modules (*.DEF) and the file M2ED.CFG.
  292.  
  293.           The  utilities  floppy  will  take  all the rest: the linker
  294.           (M2LINK.EXE), other .EXE files, and the library and  runtime
  295.           support object files (*.M2O and *.BIN).
  296.  
  297.           Assuming that  you  will  use  drive  A for the compiler and
  298.           utilities  disk  and  drive B as your work  drive,  add  the
  299.           following to your AUTOEXEC.BAT file:
  300.  
  301.                SET PATH=A:
  302.                SET M2LIB=A:
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.           Software installation                                      5
  327.           
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.           2.3 Recommended setup for a hard disk system
  337.  
  338.  
  339.           Place  the  executable  files  (*.EXE)  and  M2ED.CFG  in  a
  340.           directory currently in the DOS search  path,  or  in  a  new
  341.           directory  (ex:  \MODULA2)  to be added to the  PATH  list. 
  342.           Example:
  343.  
  344.                SET PATH=C:\BIN;C:\MODULA2
  345.  
  346.           Make a directory for the library files (ex: \M2LIB) and copy
  347.           all  the   .DEF,   .M2O  and  .BIN  files  to  it.   To  the
  348.           AUTOEXEC.BAT file add the line:
  349.  
  350.                SET M2LIB=C:\M2LIB
  351.  
  352.           You  will  probably want to create a directory for your  own
  353.           reusable  library  modules.  This directory can be added  to
  354.           the M2LIB environment variable.  Example:
  355.  
  356.                SET M2LIB=C:\M2LIB;C:\MYLIB
  357.  
  358.           You  may  keep  your  projects  in  their  own,  individual,
  359.           directories. 
  360.  
  361.           
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.           Software installation                                      6
  393.           
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.                                     Chapter 3
  405.  
  406.                         A little tour through the system
  407.  
  408.  
  409.  
  410.           After  you  finish the installation as described above,  you
  411.           are left with a  few  .MOD  files.   These  are  the example
  412.           programs.  Please copy them to your work disk or directory. 
  413.  
  414.           First, we will  look  at  the  unnatural  case of compiling,
  415.           linking and running  a  program  that  works  the first time
  416.           around.  Please execute the following commands:
  417.  
  418.                MC SIEVE /C
  419.                M2LINK SIEVE /O
  420.  
  421.           Well, that's it!  Ready to run... 
  422.  
  423.                SIEVE
  424.  
  425.           Now for the more usual case:
  426.  
  427.                MC BADSIEVE
  428.  
  429.           From the compiler menu, select 'C' for compile. 
  430.  
  431.           Gee, that was quick!  Press RETURN to take  a  look  at  our
  432.           errors... 
  433.  
  434.           The cursor  is  now  positioned at the location of the first
  435.           error.  Using the  keys  Ctrl-E (find next error) and Ctrl-P
  436.           (find previous  error)  you may visit all the errors flagged
  437.           by the compiler.  All the while, the editor shows the  error
  438.           description on the top line of the screen.  But, going  back
  439.           to the first error... 
  440.  
  441.           We really confused the compiler when we  mistakenly typed in
  442.           '.' instead  of  '..'  in  the  range declaration.  Move the
  443.           cursor  back (left arrow key) to where the '.' is,  type  in
  444.           another '.',  and  that should fix that!  As you will see as
  445.           you  type  Ctrl-E,  that single error caused the compiler to
  446.           dislike a few other things on that  same  line; we will just
  447.           ignore those errors and go on. 
  448.  
  449.           Go on to the next error  location  (line  22). This time, we
  450.           should have used a ']' but typed '}' instead.  The backspace
  451.           key  will  delete the offending character; now, type the ']'
  452.           in its place. 
  453.  
  454.           And  that  is  that.  Shall we try to  compile  the  program
  455.  
  456.  
  457.  
  458.           A little tour through the system                           7
  459.           
  460.  
  461.  
  462.  
  463.  
  464.           again? 
  465.  
  466.           Press Alt-S to save the file, Alt-Q to leave the editor and,
  467.           back at the main menu, select 'C'.
  468.  
  469.           More errors?! 
  470.  
  471.                These errors should have been detected during pass2  of
  472.                the  compiler; If not, you may try to fix these  errors
  473.                and recompile, or you may opt for loading and compiling
  474.                the new file BADSIEV1.MOD, which contains  the  earlier
  475.                fixes.
  476.  
  477.           Going back to the editor... 
  478.  
  479.           We  find   that  we  used  the  identifier  'cnt'  which  is
  480.           undefined; we  really  meant  to  use count.  So, moving the
  481.           cursor   around   with  the  cursor  keys  and/or   deleting
  482.           characters with the backspace  or delete key, please replace
  483.           'cnt' by 'count'.
  484.  
  485.           Searching for the next error... 
  486.  
  487.           The next  error occured during the processing of the call to
  488.           WriteCard. What happened here  is  that WriteCard requires 2
  489.           parameters, the second one  being  the  size of the field to
  490.           display.  So, to fix it, let's insert a comma after  'count'
  491.           and some number (for example 'count,4').
  492.  
  493.           Any more erors?  No, that is it... 
  494.  
  495.           We now save the file (Alt-S), quit the  editor  (Alt-Q)  and
  496.           recompile (c).
  497.  
  498.           Now,  the  program should have compiled without errors.   If
  499.           not, you may recompile BADSIEV2.MOD instead. 
  500.  
  501.           We may now quit the compiler (q).
  502.  
  503.           By  now,  we  have  some  program that  has  compiled  clean
  504.           (BADSIEVE, BADSIEV1 or BADSIEV2).  In  what follows, we will
  505.           assume all went well and we have BADSIEVE.
  506.  
  507.           If you look at  the  directory,  you will see the new object
  508.           module  created  as  a  result  of  the  previous   exercise
  509.           (BADSIEVE.M2O).  The compiler always writes its output to  a
  510.           file with the extension 'M2O'.
  511.  
  512.           Let us link and test the program:
  513.  
  514.                M2LINK BADSIEVE /L
  515.  
  516.           We use the /L option so  that  the  line  number information
  517.           written  out by the compiler to  the  object  file  will  be
  518.           preserved  by  the  linker.   We will need this  information
  519.           later. 
  520.  
  521.  
  522.  
  523.  
  524.           A little tour through the system                           8
  525.           
  526.  
  527.  
  528.  
  529.  
  530.                BADSIEVE
  531.  
  532.           A  runtime error?  And it gives  us  a  PC  location.   Very
  533.           informative, is it not?  How in the world are we supposed to
  534.           fix the program based on that?  Do not dispair! 
  535.  
  536.           Looking at your directory,  you  will notice that the linker
  537.           created 2 files: BADSIEVE.EXE and BADSIEVE.DBG.
  538.  
  539.           No, TYPEing BADSIEVE.DBG does  not  help,  it  just displays
  540.           garbage.   But  we  have a utility called DBG2MAP that  will
  541.           convert  the  information  in   that  file  to  a  DOS  LINK
  542.           compatible MAP file.  Let's try it:
  543.  
  544.                DBG2MAP BADSIEVE
  545.  
  546.           Now,  using  your  favorite editor (or the editor in MC:  MC
  547.           BADSIEVE.MAP   and   then  E),  look  at  the  contents   of
  548.           BADSIEVE.MAP. In the last few lines of the file, we have the
  549.           line  number  information  for  BADSIEVE. If you look up the
  550.           line whose address is closest (but lower) to  the  PC in the
  551.           error  message,  you get the number of the  line  where  the
  552.           error occured (line 22).
  553.  
  554.           Let's see what happened... 
  555.  
  556.                MC BADSIEVE
  557.  
  558.           Pick 'E' to go  into  the editor and, either move the cursor
  559.           down  to  the  line  indicated by your research, or let  the
  560.           editor find it with Alt-G.
  561.  
  562.           So, what is the problem?  Well, we declared the 'flag' array
  563.           to have  a  maximum  index  of 8190, but 'j' got bigger than
  564.           that (the FOR loop will increment  'j'  up  to  the value of
  565.           10000).
  566.  
  567.           You may fix the problem by deleting the  '10000'  and typing
  568.           in its place 'SIZE'.
  569.  
  570.           Recompile the program, link it, and run it.   Did  it work? 
  571.           Good.
  572.  
  573.           It is time for you to  experiment  on your own.  But, before
  574.           you  do  much  more,  you may want to check out  the  Editor
  575.           chapter of the documentation. 
  576.  
  577.           
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.           A little tour through the system                           9
  591.           
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.                                     Chapter 4
  603.  
  604.                                   The Compiler
  605.  
  606.  
  607.  
  608.           In  Modula-2,  identifiers  may  be  used  before  they  are
  609.           declared, except when they  are  used in another declaration
  610.           (this restriction does not  apply to pointers).  This forces
  611.           the compilation process to be done in at  least two passes. 
  612.           To avoid imposing unnecessary restrictions and, yet, provide
  613.           reasonable performance, the two pass  approach was selected:
  614.           During  the  first  pass,  syntax  analysis  and declaration
  615.           analysis  are  performed;  The   second  pass  performs  the
  616.           semantic analysis and code generation. 
  617.  
  618.           The compiler has an  integrated  text editor.  Should errors
  619.           be encountered,  the  editor  is  invoked  at the end of the
  620.           current compiler pass (sooner, if an error  is  found during
  621.           the  processing  of  an  import  list or if  20  errors  are
  622.           identified). 
  623.  
  624.           The  compiler  also  has  a  built in "make"  processor.   A
  625.           makefile must be created  before  this  process is invoked. 
  626.           Although you can create  a  makefile  using  the  editor, we
  627.           recommend  that  you  use  the  utility  provided  for  that
  628.           purpose: GENMAKE.
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.           The Compiler                                              10
  657.           
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.           4.1 Running the compiler
  667.  
  668.  
  669.           Compiler invocation:
  670.  
  671.                MC [myprog] [/c]
  672.  
  673.           If the compiler is invoked without the '/c' option, you will
  674.           get a screen that looks something like this:
  675.  
  676.  
  677.                Modula-2 compiler, Version 1.0
  678.                (C) Copyright 1987 Fitted Software Tools.
  679.                All rights reserved.
  680.  
  681.                Editor Heap in use:           18K
  682.                Available Heap:              216K
  683.  
  684.                Work module: myprog.MOD
  685.  
  686.                New  Compile  Edit  Make  Quit >
  687.  
  688.  
  689.  
  690.           The options at this point are:
  691.  
  692.           New            Specify another "Work module". 
  693.  
  694.           Compile        Compile the "Work module". 
  695.  
  696.           Edit           Edit the "Work module". 
  697.  
  698.           Make           Recompile all  the  necessary  modules as per
  699.                          the rules of a makefile (you will be prompted
  700.                          for  the  makefile).   Note:  If  errors  are
  701.                          encountered during the compilation  of one of
  702.                          the modules, the make process is aborted! 
  703.  
  704.           Quit           Return to DOS.
  705.  
  706.           If you use of the '/c'  command  line  option,  the compiler
  707.           starts compiling "myprog" immediately  and, if no errors are
  708.           encountered, will bring you right back  to  the DOS prompt. 
  709.           This is useful when running the compiler from a batch file:
  710.  
  711.                MC myprog /c
  712.  
  713.           The  compiler  sets  the  DOS errorlevel to 0  if  the  last
  714.           compile  was  successful  (no  errors);  otherwise, the  DOS
  715.           errorlevel is set to 1.
  716.  
  717.           
  718.  
  719.  
  720.  
  721.  
  722.           The Compiler                                              11
  723.           
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.           4.2 The compilation process
  733.  
  734.  
  735.           
  736.  
  737.  
  738.           4.2.0.1 The input file
  739.  
  740.           If  the module to be compiled is already loaded into one  of
  741.           the editor buffers, that source is compiled.  Otherwise, the
  742.           compiler tries to open the named file. 
  743.  
  744.           
  745.  
  746.  
  747.           4.2.0.2 The imported modules
  748.  
  749.           The compiler and the linker cooperate in assuring  that  all
  750.           the modules that refer  to  a  particular  definition module
  751.           will have  been  compiled  against  the same version of that
  752.           definition module. 
  753.  
  754.           To this end, the  compiler places in the 'module header' and
  755.           'module import' records of the object file a  "module key". 
  756.           This module key is  the date of the DEF file used during the
  757.           compilation  of  the  implementation  module  or during  the
  758.           processing of the IMPORT statement. 
  759.  
  760.           Due  to  this,  the  compiler will not look  in  the  editor
  761.           buffers for the DEF files needed to process an IMPORT list. 
  762.           These are always read in from the disk. 
  763.  
  764.           
  765.  
  766.  
  767.           4.2.0.3 The output file
  768.  
  769.           The  output  from  the  compilation  of a main module or  an
  770.           implementation module is a single output file, with the same
  771.           name of  the  source  file  but  with the extension of 'M2O'
  772.           (Modula-2 Object).
  773.  
  774.           The compilation of a definition module does not generate any
  775.           new  output  files.   If  the compilation is successful  (no
  776.           errors),  the  compiler  simply  'touches' the source  file,
  777.           updating its modification time. 
  778.  
  779.           
  780.  
  781.  
  782.           4.2.0.4 A warning
  783.  
  784.           Because of  the  fact that the compiler uses the date of the
  785.  
  786.  
  787.  
  788.           The Compiler                                              12
  789.           
  790.  
  791.  
  792.  
  793.  
  794.           DEF file as that module's key, you may not modify a DEF file
  795.           unless you  intend to recompile all the modules that use it,
  796.           nor can you copy the file in such a way that its date is not
  797.           preserved. 
  798.  
  799.           In  particular,  if you are going to  be  transferring  your
  800.           modules between computers, you  must use some procedure that
  801.           will preserve all the DEF files' dates. 
  802.  
  803.           
  804.  
  805.  
  806.  
  807.  
  808.           4.3 Compiler directives
  809.  
  810.  
  811.           Certain compiler code generation options may be set  through
  812.           directives  included  in the program text.  These directives
  813.           must  appear immediately at  the  beginning  of  a  comment;
  814.           multiple directives may be entered  in  a  single comment by
  815.           separating them by commas.  Example
  816.  
  817.                (* $S-, $R+ *)
  818.  
  819.           A '+' sets the directive to TRUE, a '-' sets it to FALSE.
  820.  
  821.           The following compiler directives are defined:
  822.  
  823.           $A             Alignment.  Default  $A+. If enabled, all new
  824.                          variables  declared  are  aligned  on a  word
  825.                          boundary.   Record  fields  are  packed  (not
  826.                          aligned) regardless of the  setting  of  this
  827.                          option. 
  828.  
  829.           $S              Stack  overflow  checking.  Default $S+.  If
  830.                          enabled, stack overflow checking is performed
  831.                          on entry to a procedure and when copying open
  832.                          arrays to a procedure's local stack frame. 
  833.  
  834.           $R              Range  checking.   Default $R+. If  enabled,
  835.                          before any assignment is made  to  a variable
  836.                          of a subrange type,  the value to be assigned
  837.                          is tested against the limits  of the subrange
  838.                          type. 
  839.  
  840.           $T             Array subscript checking.   Default  $T+.  If
  841.                          enabled,  any  time a subscript operation  is
  842.                          performed on an array, the subscript value is
  843.                          checked to confirm that  the  operation would
  844.                          not generate an address outside the bounds of
  845.                          the array. 
  846.  
  847.           $L             Generate  line  number  information.  Default
  848.                          $L-. If this option  is enabled, the compiler
  849.                          will  include  a  list  of source  code  line
  850.                          numbers and their corresponding  object  code
  851.  
  852.  
  853.  
  854.           The Compiler                                              13
  855.           
  856.  
  857.  
  858.  
  859.  
  860.                          offsets in the output file.  This line number
  861.                          information is  passed  on  to  the .DBG file
  862.                          when  the  program  is  linked  with  the  /L
  863.                          option. 
  864.  
  865.           
  866.  
  867.  
  868.  
  869.  
  870.           4.4 Runtime errors
  871.  
  872.  
  873.           When, during the execution  of a program, a runtime error is
  874.           detected,  the  runtime  error handler  will  terminate  the
  875.           program and write out a message indicating the type of error
  876.           encountered and its location (PC address). 
  877.  
  878.           To find the location of the error in  the  source  code, run
  879.           DBG2MAP against the .DBG file  generated  by M2LINK for this
  880.           program.  Scanning the .MAP file created, you should be able
  881.           to always determine the module and procedure where the error
  882.           occured.  If the $L+ directive was used when  compiling  the
  883.           module in question and the /L  option  was used when linking
  884.           the  program,  the  error location can be pinpointed to  the
  885.           offending  line  by scanning the line number information  at
  886.           the end of the .MAP file. 
  887.  
  888.           
  889.  
  890.  
  891.           4.4.1 Trapping runtime errors in your program
  892.  
  893.           The  Library module System provides  you  with  a  means  of
  894.           intercepting  runtime   errors.    The   following  are  the
  895.           currently defined runtime error  numbers  that may be passed
  896.           to your error handler routine:
  897.  
  898.                0   stack overflow ($S option)
  899.                1   range error ($R or $T option)
  900.                2   integer/cardinal overflow (divide by zero)
  901.                3   floating point error
  902.                4   function did not execute a RETURN
  903.                5   HALT was invoked
  904.  
  905.  
  906.  
  907.  
  908.           4.5 Compiler size limits
  909.  
  910.  
  911.           The following are the  code  and data size limits imposed by
  912.           this compiler:
  913.  
  914.             -  A string constant cannot exceed 80 characters.  This is
  915.                also the limit set for the size of any identifier. 
  916.  
  917.  
  918.  
  919.  
  920.           The Compiler                                              14
  921.           
  922.  
  923.  
  924.  
  925.  
  926.             -   Each  compilation  module  is  assigned  its own  data
  927.                segment, which can be up to  64k  in size.  In the data
  928.                segment, the compiler allocates  the  space for all the
  929.                module's  global  variables and some  of  the  module's
  930.                constants. 
  931.  
  932.             -  The maximum size of a data structure is 65532 bytes. 
  933.  
  934.             -   The  maximum  amount of space allocated for  variables
  935.                local to a procedure is 32000 bytes. 
  936.  
  937.             -  The compiler will  also  refuse to generate the code to
  938.                pass,  in  a  procedure  call,  by  value, a  parameter
  939.                greater than 65000 bytes in size. 
  940.  
  941.           The following are the compiler's internal limits:
  942.  
  943.             -  The maximum  number of different (namewise) identifiers
  944.                that can be processed in a single compilation is 2000.
  945.  
  946.             -  The  total  number  of  characters in all the different
  947.                (namewise)  identifiers processed  cannot  exceed  8000
  948.                characters. 
  949.  
  950.             -  No single procedure  can  be  translated into more than
  951.                10k of object code. 
  952.  
  953.             -   An  array of 8k bytes is used to keep track of all the
  954.                initialized data for a module.  This imposes a limit on
  955.                the  total  amount  of string, real and long  constants
  956.                used in the compilation module. 
  957.  
  958.  
  959.  
  960.  
  961.           4.6 The language supported
  962.  
  963.  
  964.           This  release  of the  compiler  will  translate  a  program
  965.           written in the Modula-2 language as defined by Niklaus Wirth
  966.           in the  3rd  edition  of his book "Programming in Modula-2",
  967.           with the exceptions noted bellow:
  968.  
  969.           
  970.  
  971.             -   Integer  and  Cardinal   arithmetic  overflow  is  not
  972.                detected. 
  973.  
  974.             -  Module priority specifications are not allowed. 
  975.  
  976.             -  ASM is a reserved word in this implementation. 
  977.  
  978.             -  For those programmers that "grew  up" in the Hex world,
  979.                a way to define  CHAR  literals in Hex is provided: 20X
  980.                corresponds to the "space" character in ASCII.
  981.  
  982.           
  983.  
  984.  
  985.  
  986.           The Compiler                                              15
  987.           
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.           4.6.1 LONGINT and LONGCARD
  995.  
  996.           This compiler  implements  the  standard  types  LONGINT and
  997.           LONGCARD.
  998.  
  999.           Operands of the type LONGINT or  LONGCARD  may appear in any
  1000.           expression, just like INTEGER or CARDINAL. But that is about
  1001.           it! 
  1002.  
  1003.           Subranges of these types are not supported. 
  1004.  
  1005.           No standard procedure (like INC, DEC) except the ones listed
  1006.           later in this document will accept operands of  one of these
  1007.           types. 
  1008.  
  1009.           A variable of type LONGINT or LONGCARD cannot be used as the
  1010.           control variable in a FOR loop.   Neither can CASE labels be
  1011.           of a LONG type. 
  1012.  
  1013.           Constants  of type LONGINT  or  LONGCARD  can  be  coded  in
  1014.           decimal only and are terminated by an 'L'. Example
  1015.  
  1016.                123L is a valid LONGCARD or LONGINT constant
  1017.  
  1018.                -348762L is a valid LONGINT constant
  1019.  
  1020.                565656 -89076 are CARDINAL and INTEGER constants out of
  1021.                range
  1022.  
  1023.  
  1024.           4.6.2 Additional standard procedures
  1025.  
  1026.  
  1027.           4.6.2.1 NEW and DISPOSE
  1028.  
  1029.           NEW  and  DISPOSE  have  been  deleted  from  the   language
  1030.           definition in the 3rd edition of Wirth's book.  We implement
  1031.           them thus:
  1032.  
  1033.                NEW(p)
  1034.  
  1035.           Invokes  the  procedure ALLOCATE, which must conform to  the
  1036.           type:
  1037.  
  1038.                PROCEDURE ( VAR ADDRESS, CARDINAL )
  1039.  
  1040.           passing along p and  the  size of the object p is defined as
  1041.           pointing to. 
  1042.  
  1043.                DISPOSE(p)
  1044.  
  1045.           Invokes the procedure DEALLOCATE, which must conform to  the
  1046.           type:
  1047.  
  1048.                PROCEDURE ( VAR ADDRESS, CARDINAL )
  1049.  
  1050.  
  1051.  
  1052.           The Compiler                                              16
  1053.           
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.           passing  along p and the size of the object p is defined  as
  1060.           pointing to. 
  1061.  
  1062.           The  procedures  ALLOCATE and DISPOSE  must,  therefore,  be
  1063.           defined in the module using  NEW and/or DISPOSE, or imported
  1064.           from some other module, like Storage.
  1065.  
  1066.           
  1067.  
  1068.  
  1069.           4.6.2.2 LONG and SHORT
  1070.  
  1071.                PROCEDURE LONG( INTEGER ) :LONGINT;
  1072.  
  1073.                PROCEDURE LONG( CARDINAL ) :LONGCARD;
  1074.  
  1075.                PROCEDURE SHORT( LONGINT ) :INTEGER;
  1076.  
  1077.                PROCEDURE SHORT( LONGCARD ) :CARDINAL;
  1078.  
  1079.           LONG takes an INTEGER (CARDINAL)  and  converts  it  into  a
  1080.           LONGINT (LONGCARD).
  1081.  
  1082.           SHORT takes  a  LONGINT  (LONGCARD)  and converts it into an
  1083.           INTEGER (CARDINAL).
  1084.  
  1085.  
  1086.  
  1087.  
  1088.           4.7 Objects exported by the pseudo module SYSTEM
  1089.  
  1090.  
  1091.           4.7.0.1 TYPE BYTE
  1092.  
  1093.           Takes 1  byte  of  storage.   Only assignment is defined for
  1094.           this  type.   If  the formal parameter of a procedure is  of
  1095.           type BYTE, the corresponding actual parameter may be  of any
  1096.           type that takes 1 byte of storage. 
  1097.  
  1098.           If the formal parameter of  a  procedure is of type ARRAY OF
  1099.           BYTE,  the  corresponding  actual  parameter  may be of  any
  1100.           type. 
  1101.  
  1102.  
  1103.           4.7.0.2 TYPE WORD
  1104.  
  1105.           Takes 1 word  (2  bytes)  of  storage.   Only  assignment is
  1106.           defined  for  this  type.   If  the  formal  parameter of  a
  1107.           procedure  is  of  type  WORD,   the   corresponding  actual
  1108.           parameter may be of any type that takes 1 word of storage. 
  1109.  
  1110.           If the  formal  parameter of a procedure is of type ARRAY OF
  1111.           WORD,  the  corresponding  actual  parameter  may be of  any
  1112.           type.  Care should be taken in this case, as the size of the
  1113.           parameter passed is rounded up to an even size. 
  1114.  
  1115.  
  1116.  
  1117.  
  1118.           The Compiler                                              17
  1119.           
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.           4.7.0.3 TYPE ADDRESS
  1127.  
  1128.           The  type  ADDRESS  is  compatible with all pointer  types. 
  1129.           ADDRESS itself is defined as a  POINTER  TO  WORD.  In  this
  1130.           implementation, the type ADDRESS  is not compatible with any
  1131.           arithmetic type.  This is due to  the  fact  that  the Intel
  1132.           8086  series  processors  use segmented addresses.  It would
  1133.           not  be  hard  to  implement automatic  conversions  between
  1134.           LONGCARD  and  ADDRESS  but it is felt that  this  would  be
  1135.           contrary to the spirit of the language, whereby the compiler
  1136.           is not expected to perform any "magic" tricks.  Instead, two
  1137.           functions are provided for that purpose: FLAT and PTR.
  1138.  
  1139.  
  1140.           4.7.0.4 SEG and OFS
  1141.  
  1142.           These  are field definitions  for  POINTER  types.   If  you
  1143.           import these you may access the segment  or  offset portions
  1144.           of a pointer variable using regular field selection syntax. 
  1145.           Example
  1146.  
  1147.                pointer.SEG :segment portion of pointer
  1148.  
  1149.  
  1150.           4.7.0.5 PROCEDURE ADR
  1151.  
  1152.           ADR( designator ) Returns  the  address  of designator (type
  1153.           ADDRESS).
  1154.  
  1155.  
  1156.           4.7.0.6 PROCEDURE FLAT
  1157.  
  1158.           FLAT( ADDRESS ) returns a LONGCARD "flat" address. 
  1159.  
  1160.  
  1161.           4.7.0.7 PROCEDURE PTR
  1162.  
  1163.           PTR(  LONGCARD  )  returns  an ADDRESS corresponding to  the
  1164.           "flat" address represented by the LONGCARD.
  1165.  
  1166.  
  1167.           4.7.0.8 PROCEDURE NEWPROCESS
  1168.  
  1169.           NEWPROCESS(p:PROC; a:ADDRESS; n:CARDINAL; VAR p1:ADDRESS)
  1170.  
  1171.           creates a new process whose entry point is  p  and workspace
  1172.           is  at a for n bytes.  p1 is the new process pointer.   This
  1173.           process is not activated until a TRANSFER to p1 is done. 
  1174.  
  1175.  
  1176.           4.7.0.9 PROCEDURE TRANSFER
  1177.  
  1178.           TRANSFER( VAR p1, p2 :ADDRESS)
  1179.  
  1180.           suspends the current process, assigning it to p1 and resumes
  1181.  
  1182.  
  1183.  
  1184.           The Compiler                                              18
  1185.           
  1186.  
  1187.  
  1188.  
  1189.  
  1190.           p2.  The current process' value is assigned to p1 only after
  1191.           p2 has been identified; it is, therefore, okay for p1 and p2
  1192.           to be the same. 
  1193.  
  1194.  
  1195.           4.7.0.10 PROCEDURE IOTRANSFER
  1196.  
  1197.           IOTRANSFER( VAR p1, p2 :ADDRESS; intVector :CARDINAL )
  1198.  
  1199.           issues a  TRANSFER from p1 to p2 (just the way TRANSFER does
  1200.           it)  after  installing the current process for  reactivation
  1201.           when  an   interrupt   comes  in  through  interrupt  vector
  1202.           intVector. 
  1203.  
  1204.           When the interrupt occurs, the interrupt vector is  reloaded
  1205.           with  its  previous  value.   A TRANSFER is done to the  I/O
  1206.           process (the  one  that  issued the IOTRANSFER) such that p2
  1207.           now contains  the value of the process that was running when
  1208.           the interrupt occured. 
  1209.  
  1210.  
  1211.           4.7.0.11 ASSEMBLER
  1212.  
  1213.           An  8086  inline  assembler is provided.  Once ASSEMBLER  is
  1214.           imported from SYSTEM, you can enter inline assembler code by
  1215.           bracketing it with the keywords ASM and END.
  1216.  
  1217.           Assembler input is free form.   Comments  are  entered as in
  1218.           regular Modula-2. Example
  1219.  
  1220.                loop:   CMP  BYTE [SI], 0   (*end of string?*)
  1221.                        MOV  BYTE [DI], [SI]
  1222.                        INC  SI  INC DI     (*increment pointers*)
  1223.                        JMP  loop
  1224.  
  1225.           The assembler accepts all  the  8086/8088 opcode mnemonics. 
  1226.           Address  operands  can  be  coded  in  just  about any  form
  1227.           acceptable  to  other  assemblers,  except  that   the  only
  1228.           operator supported if '+'. Operand type overrides are: WORD,
  1229.           BYTE, FAR, NEAR and are not to  be  followed  by the keyword
  1230.           POINTER or PTR. Example
  1231.  
  1232.                label:  MOV  AX, ES:[BX,DI+5]
  1233.                        MOV  AX, ES:5[DI+BX]
  1234.                        MOV  WORD [5], 1
  1235.                        CALL NEAR [DI]
  1236.                        TEST BYTE i+2, 1
  1237.  
  1238.           All the mnemonics and register  names  must  be  entered  in
  1239.           upper case.  In case  you  need  to use a Modula-2 name that
  1240.           conflicts with one of  the  assembler  reserved symbols, you
  1241.           may precede it with a '@'. Example
  1242.  
  1243.                MOV @AX, AX
  1244.  
  1245.           would generate a move from register AX to variable AX.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.           The Compiler                                              19
  1251.           
  1252.  
  1253.  
  1254.  
  1255.  
  1256.           All   modula-2   variables  can  generaly  be  accessed   in
  1257.           assembler.   Record  field  names  are  not accessible  from
  1258.           assembler.  The assembler will not automatically do anything
  1259.           for you.  For example:  if you specify a VAR parameter as an
  1260.           operand to an instruction, you are naming the address of the
  1261.           pointer to the actual parameter.  Example
  1262.  
  1263.                PROCEDURE p( VAR done :BOOLEAN );
  1264.                ...
  1265.                ASM
  1266.                     LES  DI, done
  1267.                     MOV  BYTE ES:[DI], TRUE
  1268.                END;
  1269.  
  1270.           is the correct way of storing TRUE in done. 
  1271.  
  1272.           The  following  types  of  constants  may  be  accessed   in
  1273.           assembler: INTEGER, CARDINAL, BOOLEAN, CHAR and  enumeration
  1274.           constants. 
  1275.  
  1276.           All labels declared inside  an ASM section are local to that
  1277.           section of code.  But labels names cannot  match  some  name
  1278.           known in the scope of the  current  procedure.   Labels  can
  1279.           only be referenced in jump instructions. 
  1280.  
  1281.           All  jumps  are  optimized  by  the  compiler.   There   is,
  1282.           therefore, no  need (or capability) to specify the size of a
  1283.           jump.  In particular, the  compiler  will turn a conditional
  1284.           jump out of range into a reverse conditional jump over a far
  1285.           jump to the original destination. 
  1286.  
  1287.           Remember, this is a  Modula-2  compiler,  not an assembler! 
  1288.           The  inline assembler capability  is  provided  for  use  in
  1289.           exceptional situations only. 
  1290.  
  1291.           
  1292.  
  1293.  
  1294.  
  1295.  
  1296.           4.8 The generated object code
  1297.  
  1298.  
  1299.           
  1300.  
  1301.  
  1302.           4.8.1 Data type representation
  1303.  
  1304.           CHAR           1 byte
  1305.  
  1306.           INTEGER        2 bytes 2's complement
  1307.  
  1308.           CARDINAL       2 bytes
  1309.  
  1310.           LONGCARD       4 bytes
  1311.  
  1312.           LONGINT        4 bytes 2's complement
  1313.  
  1314.  
  1315.  
  1316.           The Compiler                                              20
  1317.           
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.           BOOLEAN        1 byte (1=TRUE, 0=FALSE)
  1324.  
  1325.           REAL           4 bytes Intel 8087 format. 
  1326.  
  1327.           BITSET         1 word.  0 is low order bit, 15 is high order
  1328.                          bit. 
  1329.  
  1330.           Enumerations   1 byte
  1331.  
  1332.           SETs           1 to 8 words (sets of up to 256 elements)
  1333.  
  1334.           POINTERs       4 bytes in Intel 8086/88 format
  1335.  
  1336.           PROCEDUREs     4 bytes POINTER to procedure entry point
  1337.  
  1338.           Addresses are represented in the default Intel 8086 format:
  1339.  
  1340.                1 word        byte offset
  1341.  
  1342.                1 word        segment
  1343.  
  1344.           Numeric  values  are likewise represented the way the  Intel
  1345.           8086 processor family likes them: low order byte first, high
  1346.           order byte last. 
  1347.  
  1348.           
  1349.  
  1350.  
  1351.           4.8.2 The runtime memory map
  1352.  
  1353.           Currently, the  compiler  generates  code  using  the "huge"
  1354.           memory model only.  Each module has  its  own  data and code
  1355.           segments.  The linker binds all the code segments first, and
  1356.           then all the data segments.  The stack  is  allocated  above
  1357.           the data segments.  All  the  remainning memory is available
  1358.           for the heap. 
  1359.  
  1360.           When a  program  is  loaded  for execution, here is what the
  1361.           memory looks like:
  1362.  
  1363.  
  1364.                From low to high addresses:
  1365.  
  1366.                0         ----------------------------------------------
  1367.                          I  Interrupt vectors                         I
  1368.                          I  DOS                                       I
  1369.                PSP       I  Program segment prefix                    I
  1370.                PSP+100h  I  Program Code segments                     I
  1371.                          I  Program Data segments                     I
  1372.                StackSeg  I  Stack                                     I
  1373.                HeapTop   I  Heap                                      I
  1374.                          I  ...                                       I
  1375.                          I  DOS Command (resident portion)            I
  1376.                MemTop    ----------------------------------------------
  1377.  
  1378.           Label names on the left are the ones exported by System.
  1379.  
  1380.  
  1381.  
  1382.           The Compiler                                              21
  1383.           
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.           This system uses interrupt  vector  192  (0C0H)  at location
  1390.           0000:0300. Interrupt 192  is  issued  by  a  program  when a
  1391.           runtime  error  occurs, when  HALT  is  invoked  or  when  a
  1392.           coroutine other than the main one terminates via a return. 
  1393.  
  1394.           The first word (offset 0) in every code segment contains the
  1395.           data segment value for that particular module. 
  1396.  
  1397.  
  1398.           4.8.3 Procedure calling conventions
  1399.  
  1400.           Procedure parameters are pushed  into the stack 1st argument
  1401.           first.  Control is then transferred to the procedure through
  1402.           a  FAR call.  It is the called procedure's responsibility to
  1403.           remove its parameters from the stack before returning. 
  1404.  
  1405.           
  1406.  
  1407.  
  1408.           4.8.3.1 Parameter passing (all except open array parameters)
  1409.  
  1410.           If the formal parameter of a procedure is a value parameter,
  1411.           the actual parameter is copied into the stack. 
  1412.  
  1413.           If  the formal parameter is a variable parameter (VAR),  the
  1414.           address of the actual  parameter  is  pushed  into the stack
  1415.           (first  the segment portion of  the  address  and  then  the
  1416.           offset part). 
  1417.  
  1418.           
  1419.  
  1420.  
  1421.           4.8.3.2 Parameter passing (open array parameters)
  1422.  
  1423.           If the  formal  parameter  is an open array, the address and
  1424.           HIGH value of the  corresponding formal parameter are pushed
  1425.           into the stack (HIGH value first,  and  then the address, as
  1426.           above). 
  1427.  
  1428.           If the open array parameter is a value  parameter, the value
  1429.           of  the  actual  parameter  is  copied  into  the  stack  on
  1430.           procedure entry. 
  1431.  
  1432.           
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.           The Compiler                                              22
  1449.           
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.                                     Chapter 5
  1461.  
  1462.                                  The Text Editor
  1463.  
  1464.  
  1465.  
  1466.           The  text  editor  included  in  this  package  has  all the
  1467.           features that you have come to expect from  a  basic program
  1468.           editor:  the  ability  to  insert,  delete,  move, find  and
  1469.           replace text;  support  for  concurrent  editing of multiple
  1470.           files (as many as will fit  in  memory)  in separate windows
  1471.           (as many as will fit on the screen) with the ability to copy
  1472.           or move text from window to window. 
  1473.  
  1474.           Although  you  may load  the  same  file  in  two  different
  1475.           windows, the editor will not be aware of the  fact  and will
  1476.           treat the two copies as two different files. 
  1477.  
  1478.           The only preset limitation in the editor is  that  it cannot
  1479.           handle files bigger than 64k. This decision was justified by
  1480.           the fact that Modula-2 programs are supposed to be modular. 
  1481.           File load/save speed was the overriding factor here. 
  1482.  
  1483.           All the text editor keys are defined by the user through the
  1484.           use of the EDCONFIG program.   When  the  editor  starts, it
  1485.           expects to find the file M2ED.CFG in the current PATH.
  1486.  
  1487.           To get  you  started,  we  provide  a M2ED.CFG file with the
  1488.           following definitions:
  1489.  
  1490.                Cursor left                    : Left
  1491.                Cursor right                   : Right
  1492.                Cursor up                      : Up
  1493.                Cursor down                    : Down
  1494.                Previous word                  : ^Left
  1495.                Next word                      : ^Righ
  1496.                Page up                        : PgUp
  1497.                Page down                      : PgDn
  1498.                Cursor to beginning of line    : Home
  1499.                Cursor to end of line          : End
  1500.                Cursor to top of window        : ^Home
  1501.                Cursor to bottom of window     : ^End
  1502.                To beginning of file           : ^PgUp
  1503.                To end of file                 : ^PgDn
  1504.                Current line to top of window  : AltT
  1505.                Toggle insert/overtype         : Ins
  1506.                Delete character under cursor  : Del
  1507.                Delete previous character      : ^H
  1508.                New file                       : AltN
  1509.                Read file                      : AltR
  1510.                Write block                    : AltW
  1511.  
  1512.  
  1513.  
  1514.           The Text Editor                                           23
  1515.           
  1516.  
  1517.  
  1518.  
  1519.  
  1520.                Save file                      : AltS
  1521.                Open window                    : ^O
  1522.                Close Window                   : ^C
  1523.                Next window                    : F2
  1524.                Previous window                : aF2
  1525.                Split screen                   : ^S
  1526.                Mark beginning of block        : F7
  1527.                Mark end of block              : F8
  1528.                Goto beginning of block        : AltB
  1529.                Goto end of block              : AltE
  1530.                Clear block marks              : AltH
  1531.                Copy block                     : AltC
  1532.                Delete block                   : AltD
  1533.                Move block                     : AltM
  1534.                Search forward                 : F5
  1535.                Search backwards               : aF5
  1536.                Replace forward                : F6
  1537.                Replace backwards              : aF6
  1538.                Global replace                 : ^F6
  1539.                Repeat last search/replace     : F1
  1540.                Goto next error                : ^E
  1541.                Goto previous error            : ^P
  1542.                Goto line                      : AltG
  1543.                Set options                    : AltO
  1544.                Redraw the screen              : ^L
  1545.                Quit                           : AltQ
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.           The Text Editor                                           24
  1581.           
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.                                     Chapter 6
  1593.  
  1594.                                    The Linker
  1595.  
  1596.  
  1597.  
  1598.           The linker is invoked by the command line
  1599.  
  1600.                M2LINK myprog [/s n] [/h n] [/o] [/p] [/l]
  1601.  
  1602.                where 'myprog' is the main  module  of  the program you
  1603.                are creating.  The options are thus:
  1604.  
  1605.                /s n          n is the size of the  stack  to  allocate
  1606.                              (default is 4096).
  1607.  
  1608.                /h n           n  is the amount of space to reserve for
  1609.                              the heap (in paragraphs).  The default is
  1610.                              all the free memory. 
  1611.  
  1612.                /o             invokes  the  optimizer.  The  optimizer
  1613.                              prevents the output, to  the object file,
  1614.                              of  all  the procedures that are part  of
  1615.                              included modules but are not referenced. 
  1616.                              This  will  make  your  final  EXE  files
  1617.                              smaller. 
  1618.  
  1619.                /p            tells the linker to include  the profiler
  1620.                              (M2Prof.M2O).  For  further  information,
  1621.                              see the chapter on "Utilities".
  1622.  
  1623.                /l             tells  the  linker  to  process the line
  1624.                              number information  in the .M2O files and
  1625.                              include it in the .DBG file.  This option
  1626.                              is disabled if the optimizer is invoked. 
  1627.  
  1628.                /k             tells the linker to ignore module  keys,
  1629.                              i.e.  to  not  check  for  module version
  1630.                              compatibility.   This  option  should  be
  1631.                              used with extreme care. 
  1632.  
  1633.           The  linker  creates  two  files:  the  .EXE  file  is  your
  1634.           executable program, the .DBG  file  is  a  file  containning
  1635.           symbol information for use by other utilities (see  Map file
  1636.           generator, Profiler).
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.           The Linker                                                25
  1647.           
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.           6.1 Module keys
  1657.  
  1658.  
  1659.           The module header record and  the import records written out
  1660.           by the compiler to the object file are stamped with the date
  1661.           of  the .DEF file that was  processed  -  this  becomes  the
  1662.           module  key.   The linker will assure that these module keys
  1663.           in  the module header of the  imported  module  and  in  the
  1664.           import record match; If they do not match, both modules were
  1665.           not compiled using the same definition module. 
  1666.  
  1667.           Because of the use of module keys, it is imperative that the
  1668.           date of  the  distributed  .DEF files not be modified unless
  1669.           you intend to recompile the implementation modules. 
  1670.  
  1671.           
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.           The Linker                                                26
  1713.           
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.                                     Chapter 7
  1725.  
  1726.                                  Other utilities
  1727.  
  1728.  
  1729.  
  1730.           
  1731.  
  1732.  
  1733.  
  1734.  
  1735.           7.1 Editor keyboard configurator
  1736.  
  1737.  
  1738.           This program lets you define the keystrokes to  be  used  to
  1739.           invoke all the editor commands. 
  1740.  
  1741.           Invokation:
  1742.  
  1743.                EDCONFIG
  1744.  
  1745.           You will be prompted  for  a  log file (default M2ED.HLP), a
  1746.           text file in which all of your configuration choices will be
  1747.           saved.   You  could  print  this  file  to  create  a  quick
  1748.           reference card. 
  1749.  
  1750.           EDCONFIG will then prompt  you  for  the  key sequence to be
  1751.           used  for  each editor command.  For each command,  EDCONFIG
  1752.           will  also give you the option of defining an alternate  key
  1753.           sequence. 
  1754.  
  1755.           Once you have run through all the commands, the program will
  1756.           prompt you for an output file, the default being 'M2ED.CFG'.
  1757.  
  1758.           
  1759.  
  1760.  
  1761.  
  1762.  
  1763.           7.2 Map file generator
  1764.  
  1765.  
  1766.           Invokation:
  1767.  
  1768.                DBG2MAP module_name
  1769.  
  1770.           Reads the .DBG file created by M2LINK and creates a DOS LINK
  1771.           compatible .MAP file. 
  1772.  
  1773.           
  1774.  
  1775.  
  1776.  
  1777.  
  1778.           Other utilities                                           27
  1779.           
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.           7.3 Make and the Makefile generator
  1789.  
  1790.  
  1791.           These utilities eliminate the burden, on the user's part, of
  1792.           having  to  figure  out  which  modules  are  affected  and,
  1793.           therefore, need to be recompiled as  a result of any changes
  1794.           to particular definition modules. 
  1795.  
  1796.           GENMAKE  creates  the  .MAK file,  the  file  with  all  the
  1797.           dependencies (this is the  hard  part)  whereas  MAKE (built
  1798.           into the compiler) will  insure  that these dependencies are
  1799.           observed when updating the object files. 
  1800.  
  1801.           GENMAKE Invokation:
  1802.  
  1803.                GENMAKE main_module_name
  1804.  
  1805.           generates   the   .MAK  file  containning  all  the   module
  1806.           dependencies for the named program.  It does this by reading
  1807.           all   the   IMPORT  statements  in  the  main  module   and,
  1808.           recursively,  generating the dependency lists for all  those
  1809.           modules (but only  the ones that can be found in the current
  1810.           directory!).  GENMAKE will indeed read all the .MOD and .DEF
  1811.           files involved. 
  1812.  
  1813.           MAKE invocation: see "Running the Compiler".
  1814.  
  1815.           MAKE will invoke the compiler as needed to  assure  that all
  1816.           the dependencies in the make file  are  observed.   MAKE  is
  1817.           dumb  in  that  it  will  just  run   through  the  makefile
  1818.           sequentially.   It  was GENMAKE's responsibility to see that
  1819.           the  dependencies  are listed in a proper sequence.   Please
  1820.           keep this in mind if you should edit a makefile! 
  1821.  
  1822.           
  1823.  
  1824.  
  1825.  
  1826.  
  1827.           7.4 The execution profiler
  1828.  
  1829.  
  1830.           When you link your  program  with  the /p option, the module
  1831.           M2Prof is included in the output generated. 
  1832.  
  1833.           When you execute the program, the profiler will  ask you for
  1834.           the name of the .DBG file to use and give you  an  option of
  1835.           profiling  your  entire  program  (generating  an  execution
  1836.           profile  by  module),  a particular  module  (generating  an
  1837.           execution  profile  by  procedure   in  that  module)  or  a
  1838.           particular  procedure (generating an  execution  profile  by
  1839.           line in the procedure). 
  1840.  
  1841.  
  1842.  
  1843.  
  1844.           Other utilities                                           28
  1845.           
  1846.  
  1847.  
  1848.  
  1849.  
  1850.           Upon program termination, the  profiler  outputs the list of
  1851.           all   the   modules/procedures/lines   profiled,  ranked  by
  1852.           execution time, to a file of your choice. 
  1853.  
  1854.           This profiler  is  not  that  versatile,  but  it  is useful
  1855.           nevertheless.  It  proved  instrumental  in pinpointing some
  1856.           obvious areas for  improvement  in  the compiler (Oh, we did
  1857.           not  tell  you,  did  we?  This compiler was written in  the
  1858.           language it compiles -- Modula-2 -- and this system was used
  1859.           as  our  primary  development  tool  since very early in the
  1860.           development process). 
  1861.  
  1862.           
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.           Other utilities                                           29
  1911.           
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.                                     Chapter 8
  1923.  
  1924.                                The Library Modules
  1925.  
  1926.  
  1927.  
  1928.           For  complete  information  on   what  each  library  module
  1929.           provides, as well as its proper usage, please  look  at  the
  1930.           .DEF files. 
  1931.  
  1932.           In addition, the source code of all the  library  modules is
  1933.           available to all the registered users (see the order form in
  1934.           the back of this document for details). 
  1935.  
  1936.           
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.           The Library Modules                                       30
  1977.           
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.                                     Chapter 9
  1989.  
  1990.                                     Shareware
  1991.  
  1992.  
  1993.  
  1994.           This  software  package  is  distributed  under   the  "user
  1995.           supported" concept. 
  1996.  
  1997.           This software can be freely distributed, as long as no money
  1998.           is  charged  for it, all the files are included, unmodified,
  1999.           and  with  their  modification dates preserved.  If you  are
  2000.           going  to place this software on a bulletin board (we  thank
  2001.           you  for  it),  please  upload it in a  library  format  (we
  2002.           suggest ARC) that will preserve this package's integrity. 
  2003.  
  2004.           This  software  cannot be distributed as a part  of,  or  in
  2005.           conjunction with, another product. 
  2006.  
  2007.           This software cannot be  used  in  a  commercial environment
  2008.           without the payment of  a  $25 license fee per copy.  Please
  2009.           feel free to contact us if you would be interested in a site
  2010.           or corporate license. 
  2011.  
  2012.           The "user supported" form of distribution can be in the best
  2013.           interest of all concerned, if we consider the following: (1)
  2014.           users  are  given the opportunity to try, without  pressure,
  2015.           the software to determine  its suitability for some intended
  2016.           purpose;  and  (2)  we eliminate the high cost of publishing
  2017.           and advertising (our users do it for us) and can, therefore,
  2018.           provide the same product for less. 
  2019.  
  2020.           Our success  will  depend  not  only  on the quality of this
  2021.           software but on  the willingness of every individual user to
  2022.           "support" its developers. 
  2023.  
  2024.           If you  use  this  product,  please send in the registration
  2025.           form  in  the  back  of  this   document,  along  with  your
  2026.           registration fee.   For  $35  we  will  send  you the latest
  2027.           version   of   this  software  and,  as  a  token   of   our
  2028.           appreciation,  all  the  library and runtime support  source
  2029.           code (what  a bargain!).  This source code is made available
  2030.           to registered users only! 
  2031.  
  2032.           Whether  or not you decide to use this product, please  give
  2033.           complete  copies  of this software to others (the  more  the
  2034.           better).   You are an  integral  part  of  our  distribution
  2035.           channel! 
  2036.  
  2037.           
  2038.  
  2039.  
  2040.  
  2041.  
  2042.           Shareware                                                 31
  2043.           
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.                                    Chapter 10
  2055.  
  2056.                             Your input matters to us
  2057.  
  2058.  
  2059.  
  2060.           You can bet that this is  serious!   We  know, and you know,
  2061.           that  there  are  many ways in  which  this  system  can  be
  2062.           improved.  It is in our common  interest  that  we  agree on
  2063.           just how (what needs changing, what additional  capabilities
  2064.           are needed) and when (let's take care of the more  important
  2065.           stuff first!). 
  2066.  
  2067.           Maybe you like this software so much that  you would hate to
  2068.           see us improve it in the wrong direction (ha, ha, ha)... 
  2069.  
  2070.           Maybe you  find some weaknesses in this product that make it
  2071.           awkward to use. 
  2072.  
  2073.           Maybe  even  (God  forbid!)   that  one  or  more  of  those
  2074.           weaknesses make this software unusable for your purposes. 
  2075.  
  2076.           Whichever  the case may be, we need to know  about  it,  our
  2077.           future is at stake!!! 
  2078.  
  2079.           So, please!, fill out the survey form and send it in. 
  2080.  
  2081.           
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.           Your input matters to us                                  32
  2109.           
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.                        Your comments would be appreciated
  2116.  
  2117.           
  2118.  
  2119.  
  2120.  
  2121.           Where did you get this software from?
  2122.  
  2123.                ( ) us                        ( ) a bulletin board
  2124.                ( ) a friend                  ( ) a computer club
  2125.                ( ) a shareware software distributor
  2126.                ( ) other ________________________
  2127.  
  2128.           Systems you intend to use this software on
  2129.  
  2130.                ( ) PC (8088/8086)       ( ) AT (80286)      ( ) 80386
  2131.  
  2132.           Typical system's configuration
  2133.  
  2134.                ( ) hard disk
  2135.                ( ) 512k       ( ) 640k
  2136.                ( ) extended memory
  2137.                ( ) EGA adapter
  2138.                ( ) VGA adapter
  2139.  
  2140.           What programming languages do you use regularly?
  2141.  
  2142.                ---------------------------------------------------------
  2143.  
  2144.           Please rate the relative desirability of the following. Most
  2145.           desirable gets a 1, second gets a 2, etc. Could care less gets a
  2146.           0. Immediate requirement gets an *.
  2147.  
  2148.                Documentation
  2149.  
  2150.                ( ) language tutorial to be included in the documentation
  2151.                ( ) complete language reference manual
  2152.                ( ) other:
  2153.                    _________________________________________
  2154.  
  2155.                The compiler
  2156.  
  2157.                ( ) compatibility switch to accept 2nd edition Modula-2
  2158.                ( ) symbolic debugger
  2159.                ( ) improved space efficiency
  2160.                ( ) improved compiler speed
  2161.                ( ) ability to create .OBJ files
  2162.                ( ) inline 8087/80287 code generation
  2163.                ( ) floating point library to detect presence of 8087/80287
  2164.                ( ) code generation for the 80286 (in real mode)
  2165.                ( ) code generation for the 80386 (real mode or V8086)
  2166.                ( ) additional memory models - only one available is huge
  2167.                     ( ) tiny  ( ) small  ( ) medium  ( ) compact  ( ) large
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.                The editor
  2182.  
  2183.                ( ) support for EGA modes
  2184.                ( ) mouse based editor (in graphics mode)
  2185.  
  2186.                Integration:
  2187.                ( ) availability of freestanding editor
  2188.                ( ) availability of freestanding compiler
  2189.                ( ) add more integrated tools:
  2190.                    _______________________________________
  2191.                    _______________________________________
  2192.  
  2193.           How could we improve the compiler?
  2194.  
  2195.                _____________________________________________________________
  2196.                _____________________________________________________________
  2197.                _____________________________________________________________
  2198.                _____________________________________________________________
  2199.                _____________________________________________________________
  2200.  
  2201.  
  2202.           What features would you like to see in the editor?
  2203.  
  2204.                _____________________________________________________________
  2205.                _____________________________________________________________
  2206.                _____________________________________________________________
  2207.                _____________________________________________________________
  2208.                _____________________________________________________________
  2209.  
  2210.  
  2211.           How could we improve the development environment?
  2212.  
  2213.                _____________________________________________________________
  2214.                _____________________________________________________________
  2215.                _____________________________________________________________
  2216.                _____________________________________________________________
  2217.                _____________________________________________________________
  2218.  
  2219.           Other comments:
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.                                    BUG REPORT
  2248.  
  2249.           We would like to think that our software is bug free, but we
  2250.           have been around a while.  Someone  once  wrote  that  a bug
  2251.           free program is a program whose bugs have not been uncovered
  2252.           yet. 
  2253.  
  2254.           So,  if  you uncover one of  those  nasty  critters,  please
  2255.           provide  us  with  the information below, and whatever  else
  2256.           that may help us duplicate the problem. 
  2257.  
  2258.  
  2259.           Name_____________________________________________
  2260.  
  2261.           Company__________________________________________
  2262.  
  2263.           Address__________________________________________
  2264.  
  2265.           City, State, Zip_________________________________
  2266.  
  2267.           Telephone _____________
  2268.  
  2269.  
  2270.           Version of the software in use:  ___________________________
  2271.  
  2272.           Machine in use (make and model): ___________________________
  2273.  
  2274.           Memory / Disks / Display type:   ___________________________
  2275.  
  2276.           Operating system used:           ___________________________
  2277.  
  2278.           Other  system  information  that   may  be  pertinent  (PATH
  2279.           settings, CONFIG.SYS contents,...) 
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.           Problem description:
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.                                    ORDER FORM
  2314.  
  2315.  
  2316.  
  2317.  
  2318.           Mail this form to:
  2319.  
  2320.                Fitted Software Tools
  2321.                P.O.Box 956129
  2322.                Duluth, Ga 30136
  2323.  
  2324.           to register your copy/copies of the Modula-2 compiler and/or
  2325.           register/order additional copies. 
  2326.  
  2327.           We  distribute  the  software  and  documentation   on  360k
  2328.           floppies.    A   printed  version  of  the  manual  is   not
  2329.           available. 
  2330.  
  2331.           The  unauthorized  distribution  of  the library and runtime
  2332.           support source code included  in the distribution disks that
  2333.           you receive when you order a registered copy  or  update  is
  2334.           specifically prohibited.  This source code is made available
  2335.           to registered users only. 
  2336.  
  2337.           If you are ordering  multiple  copies for your organization,
  2338.           we would suggest that you order 1 of the  $35  packages  and
  2339.           the rest as $25 registrations.  You may then  distribute the
  2340.           number of  copies  that you ordered from the master that you
  2341.           receive. 
  2342.  
  2343.  
  2344.  
  2345.           Name_____________________________________________
  2346.  
  2347.           Company__________________________________________
  2348.  
  2349.           Address__________________________________________
  2350.  
  2351.           City, State, Zip_________________________________
  2352.  
  2353.  
  2354.           QTY
  2355.           ___   X   Registration @ $25.00                   _________
  2356.  
  2357.           ___   X   Registration & latest version @ $35.00  _________
  2358.  
  2359.           Total enclosed:                                   _________
  2360.  
  2361.  
  2362.           [We  will  start  shipping software orders during the  first
  2363.           week of August 1987. We thank you for your patience and your
  2364.           support.] 
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.                            Table of Contents
  2383.  
  2384.  
  2385.           Chapter 1 Introduction                                 2
  2386.  
  2387.              1.1 Hardware requirements                           3
  2388.              1.2 Software requirements                           3
  2389.  
  2390.           Chapter 2 Software installation                        4
  2391.  
  2392.              2.1 Theory                                          4
  2393.              2.2 Recommended setup for a system with 2
  2394.                          floppy drives                           5
  2395.              2.3 Recommended setup for a hard disk system
  2396.                                                                  6
  2397.  
  2398.           Chapter 3 A little tour through the system             7
  2399.  
  2400.           Chapter 4 The Compiler                                 10
  2401.  
  2402.              4.1 Running the compiler                            11
  2403.              4.2 The compilation process                         12
  2404.  
  2405.                    4.2.0.1 The input file                        12
  2406.                    4.2.0.2 The imported modules                  12
  2407.                    4.2.0.3 The output file                       12
  2408.                    4.2.0.4 A warning                             12
  2409.  
  2410.              4.3 Compiler directives                             13
  2411.              4.4 Runtime errors                                  14
  2412.  
  2413.                 4.4.1 Trapping runtime errors in your
  2414.                          program                                 14
  2415.  
  2416.              4.5 Compiler size limits                            14
  2417.              4.6 The language supported                          15
  2418.  
  2419.                 4.6.1 LONGINT and LONGCARD                       16
  2420.                 4.6.2 Additional standard procedures             16
  2421.  
  2422.                    4.6.2.1 NEW and DISPOSE                       16
  2423.                    4.6.2.2 LONG and SHORT                        17
  2424.  
  2425.              4.7 Objects exported by the pseudo module
  2426.                          SYSTEM                                  17
  2427.  
  2428.                    4.7.0.1 TYPE BYTE                             17
  2429.                    4.7.0.2 TYPE WORD                             17
  2430.                    4.7.0.3 TYPE ADDRESS                          18
  2431.                    4.7.0.4 SEG and OFS                           18
  2432.                    4.7.0.5 PROCEDURE ADR                         18
  2433.                    4.7.0.6 PROCEDURE FLAT                        18
  2434.                    4.7.0.7 PROCEDURE PTR                         18
  2435.                    4.7.0.8 PROCEDURE NEWPROCESS                  18
  2436.                    4.7.0.9 PROCEDURE TRANSFER                    18
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.                    4.7.0.10 PROCEDURE IOTRANSFER                 19
  2445.                    4.7.0.11 ASSEMBLER                            19
  2446.  
  2447.              4.8 The generated object code                       20
  2448.  
  2449.                 4.8.1 Data type representation                   20
  2450.                 4.8.2 The runtime memory map                     21
  2451.                 4.8.3 Procedure calling conventions              22
  2452.  
  2453.                    4.8.3.1 Parameter passing (all except
  2454.                          open array parameters)                  22
  2455.                    4.8.3.2 Parameter passing (open array
  2456.                          parameters)                             22
  2457.  
  2458.           Chapter 5 The Text Editor                              23
  2459.  
  2460.           Chapter 6 The Linker                                   25
  2461.  
  2462.              6.1 Module keys                                     26
  2463.  
  2464.           Chapter 7 Other utilities                              27
  2465.  
  2466.              7.1 Editor keyboard configurator                    27
  2467.              7.2 Map file generator                              27
  2468.              7.3 Make and the Makefile generator                 28
  2469.              7.4 The execution profiler                          28
  2470.  
  2471.           Chapter 8 The Library Modules                          30
  2472.  
  2473.           Chapter 9 Shareware                                    31
  2474.  
  2475.           Chapter 10 Your input matters to us                    32
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.