home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug001.arc / M80.HLP < prev    next >
Text File  |  1979-12-31  |  8KB  |  207 lines

  1. Invoking MACRO-80
  2. MACRO-80 Switches
  3. MACRO-80 Pseudo-Ops
  4. MACRO-80 In-Line Error Messages
  5. MACRO-80 Console Error Messages
  6. Invoking LINK-80
  7. LINK-80 Switches
  8. Invoking LIB-80
  9. LIB-80 Switches
  10. Invoking CREF-80
  11. Debugging MACRO-80 Programs Using DEBUG.MAC
  12. :Invoking MACRO-80
  13.  
  14.      MACRO-80 is invoked by the following command --
  15.  
  16.           M80 obj:fn1.ext,lst:fn2.ext=src:fn3.ext
  17.  
  18. where
  19.      obj:fn1.ext  is the device/filename for the object program
  20.      lst:fn2.ext  is the device/filename for the listing
  21.      src:fn3.ext  is the device/filename for the source
  22.  
  23. :MACRO-80 Switches
  24.  
  25.      The following switches may be specified in the command line --
  26.  
  27.           O    Print all listing addresses in octal
  28.           H    Print all listing addresses in hexadecimal
  29.  
  30.           R    Force generation of an object file
  31.           L    Force generation of a listing file
  32.           C    Force generation of a cross reference file
  33.  
  34.           Z    Assemble Zilog (Z80) mnemonics
  35.           I    Assemble Intel (8080) mnemonics
  36.  
  37.           ╨á    EacΦ /╨ allocate≤ aε extrß 25╢ byte≤ oµ stacδ spacσ fo≥ usσ ì
  38. during assembly.  Use /P if stack overflow errors occur during assembly.
  39. :MACRO-80 Pseudo-Ops
  40.  
  41.      The following are the pseudo-ops recognized by MACRO-80 --
  42.  
  43.           ASEG      COMMON    CSEG      DB        DC
  44.           DS        DSEG      DW        END       ENTRY
  45.           PUBLIC    EQU       EXT       EXTRN     NAME
  46.           ORG       PAGE      SET       SUBTTL    TITLE
  47.           .COMMENT  .PRINTX   .RADIX    .REQUEST  .Z80
  48.           .8080     IF        IFT       IFE       IFF
  49.           IF1       IF2       IFDEF     IFNDEF    IFB
  50.           IFNB      ENDIF     .LIST     .XLIST    .CREF
  51.           .XCREF    REPT      ENDM      MACRO     IRP
  52.           IRPC      EXITM     LOCAL     COND      ENDC
  53.           *EJECT    DEFB      DEFS      DEFW      DEFM
  54.           DEFL      GLOBAL    EXTERNAL  INCLUDE   MACLIB
  55.           ELSE      .LALL     .SALL     .XALLè:MACRO-80 In-Line Error Messages
  56.  
  57.      A    Argument Error           O    Bad opcode or objectionable syntax
  58.      C    Conditional nesting err  P    Phase error
  59.      D    Double Defined Symbol    Q    Questionable
  60.      E    External error           R    Relocation
  61.      M    Multiply Defined Symbol  U    Undefined symbol
  62.      N    Number error             V    Value error
  63. :MACRO-80 Console Error Messages
  64.  
  65.      No end statement encountered in input file
  66.           -- no END statement
  67.  
  68.      Unterminated conditional
  69.           -- at least one conditional is unterminated
  70.  
  71.      Unterminated REPT/IRP/IRPC/MACRO
  72.           -- at least one block is unterminated
  73.  
  74.      [xx] [No] Fatal error(s) [,xx warnings]
  75.           -- the number of fatal errors and warnings
  76. :Invoking LINK-80
  77.  
  78.      LINK-80 is invoked by typing --
  79.  
  80.           L80 obj1:filename.ext/sw1,obj2:filename.ext/sw2,...
  81.  
  82. wherσá objn:filename.ex⌠á denote≤ ß .RE╠ filσ t∩ bσ linkeΣ anΣ swεá denote≤ ì
  83. switches which control the linking process.
  84. :LINK-80 Switches
  85.  
  86.      /R        Reset -- put loader back in initial state
  87.  
  88.      /E or /E:Name
  89.                Exi⌠ LINK-8░ anΣ returε t∩ CP/M«á  SearcΦ thσ systeφ librar∙ ì
  90. fo≥ an∙ undefineΣ references«á  /E:Namσ use≤ Namσ fo≥ thσ star⌠ addres≤á oµ ì
  91. the program.
  92.  
  93.      /G or /G:Name
  94.                Star⌠á executioεá oµá thσ program«á  Again¼á iµá /G:Namσá i≤ ì
  95. specified, Name defines the start address of execution.
  96.  
  97.      <filename>/N
  98.                Save the binary on disk under the name 'filename.COM'.
  99.  
  100.      /P:adr and /D:adr
  101.                Se⌠á thσ Prograφ anΣ Datß areß origin≤ fo≥ thσ nex⌠á prograφ ì
  102. to be loaded.
  103.  
  104.  
  105.      /U
  106.                Lis⌠ thσ origiε anΣ enΣ oµ thσ prograφ anΣ datß areß a≤ wel∞ ì
  107. as all undefined globals.
  108.  
  109.      /M
  110.                Lis⌠á thσ origiε anΣ enΣ oµ thσ prograφ anΣ datßá area¼á al∞ ì
  111. defineΣ global≤ anΣ thei≥ values¼á anΣ al∞ undefineΣ global≤ followeΣ b∙ aε ì
  112. asterisk.
  113.  
  114.      <filename>/S
  115.                Search 'filename.REL' to satisfy references.
  116.  
  117.      /╪        Iµ ß filename/╬ wa≤ specified¼á /╪ wil∞ causσ thσ filσ t∩ bσ ì
  118. saved in Intel HEX format with a extension of .HEX.
  119.  
  120.      /┘        Iµ ß filename/╬ wa≤ specified¼ /┘ wil∞ creatσ ß filename.SY═ ì
  121. filσ wheε /┼ i≤ entered«  Thi≤ filσ contain≤ thσ name≤ anΣ addresse≤ oµ al∞ ì
  122. globals for use with SID or ZSID.
  123. :Invoking LIB-80
  124.  
  125.      To invoke LIB-80, type --
  126.  
  127.           LIB
  128.  
  129.      Command≤á t∩ LIB-8░ consis⌠ oµ aε optiona∞ destinatioε filenamσá whicΦ ì
  130. set≤á thσá namσ oµ thσ librar∙ beinτ created¼á followeΣ b∙ aεá equa∞á sign¼ ì
  131. followeΣ b∙ modulσ name≤ separateΣ b∙ comma≤ o≥ filename≤ witΦ modulσ name≤ ì
  132. enclosed in angle brackets separated by commas.
  133.  
  134.      T∩á selec⌠á ßá giveε modulσ froφ ß file¼á usσ thσá namσá oµá thσá filσ ì
  135. followeΣá b∙á thσá module(s⌐á specifieΣá encloseΣá iεá anglσá bracket≤á anΣ ì
  136. separateΣá b∙á commas«á  Iµ n∩ module≤ arσ selecteΣ froφ ß file¼á theεá al∞ ì
  137. modules are selected.
  138.  
  139. :LIB-80 Switches
  140.  
  141.      /O   Set listing radix to Octal
  142.      /H   Set listing radix to Hexadecimal
  143.      /U   List undefineds
  144.      /L   List cross reference
  145.      /C   Create -- start LIB over
  146.      /E   Exit -- rename .LIB to .REL and exit
  147.      /R   Rename -- rename .LIB to .REL
  148. :Invoking CREF-80
  149.  
  150.      CREF-80 is invoked by typing --
  151.  
  152.           CREF80 listing=source
  153.  
  154. wherσá 'listingºá i≤á thσá namσ oµ thσá filσá 'listing.LSTºá generateΣá anΣ ì
  155. 'sourceºá ≤á thσá namσá oµ thσ filσá 'source.CRFºá generateΣá b∙á MACRO-80«  ì
  156. 'listingº i≤ optional¼ and¼ iµ omitted¼ thσ listinτ filσ generateΣ i≤ nameΣ ì
  157. 'source.LST'.
  158. :Debugging MACRO-80 Programs Using DEBUG.MACè
  159.      DEBUG.MA├á i≤á ßá packagσ oµ MACRO≤ whicΦ thσ use≥ ma∙ emplo∙á t∩á aiΣ ì
  160. himselµá iε debugginτ MACRO-8░ programs«á  Thi≤ packagσ contain≤ tw∩á prin⌠ ì
  161. MACROs¼á onσá registe≥ displa∙ MACRO¼á anΣ onσ exi⌠ MACRO«á  Iε al∞á cases¼ ì
  162. these MACROs have no net affect on any register.
  163.  
  164.      DEBUG.MA├ i≤ useΣ b∙ firs⌠ specifyinτ i⌠ a≤ ß MACR╧ Librar∙ withiε thσ ì
  165. user's program.  This is accomplished by the statement --
  166.  
  167.           MACLIB    DEBUG.MAC
  168.  
  169. a≤ aε assembly-languagσ instructioε a⌠ thσ beginninτ oµ hi≤ program«á  Thi≤ ì
  170. statemen⌠á load≤ thσ librar∙ DEBUG.MA├ anΣ make≤ it≤ MACRO≤á availablσá fo≥ ì
  171. use.  These MACROs are --
  172.  
  173.  
  174.  Name  # Args  Size (Bytes)   Function                 Example
  175.  ----  ------  ------------   --------                 -------
  176.  
  177.  EXIT    0/1   275 or 263+    Print an exit message,   EXIT
  178.                               print the contents of    EXIT <Exit Cond 1>
  179.                               all registers, and warm
  180.                               boot CP/M
  181.  PRINT     1   19+            Print a message on CON:  PRINT <Message>
  182.  PRINTC    1   17+            Print a char string on   PRINTC <'M1',0DH>
  183.                               CON:
  184.  REGS      0   241            Print the contents of    REGS
  185.                               all registers on CON:
  186.  
  187. Note║  Thσ ½ afte≥ ß sizσ indicate≤ tha⌠ onσ mus⌠ adΣ t∩ thσ indicateΣ sizσ ì
  188. the number of characters specified in the parameter.
  189.  
  190. Note║á  Message≤ specifieΣ fo≥ EXI╘ anΣ PRIN╘ shoulΣ no⌠ contaiε restricteΣ ì
  191. MACRO-80 symbols (such as !) or an error message will result.
  192.  
  193.      An example of the use of these MACROs follows --
  194.  
  195.           MACLIB    DEBUG.MAC
  196.           -- code --
  197.           REGS                ; print all register values at this point
  198.           -- code --
  199.           PRINT     <Ck Pt 1> ; got to check point 1
  200.           -- code --
  201.           EXIT      <Exit error 1> ; should not have taken this path
  202.           -- code --
  203.           PRINT     <Ck Pt 2> ; got to check point 2
  204.           -- code --
  205.           EXIT                ; normal exit
  206.           -- code --
  207.