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

  1. Introduction
  2. Executing MAC
  3. XMAC
  4. Assembly Control Parameters
  5. Assembler Pseudo-Ops
  6. Inline Error Messages
  7. Console Error Messages
  8. :Introduction
  9.      MA├ i≤ thσ CP/═ StandarΣ Macr∩ Assembler╗ i⌠ i≤ upward-compatablσ witΦ ì
  10. ASM¼á thσ CP/═ StandarΣ Assembler«á  Thσ facilitie≤ oµ MA├ includσ assembl∙ ì
  11. oµáá Inte∞áá 808░á microcompute≥á mnemonics¼áá alonτáá witΦáá assembly-timσ ì
  12. expressions¼á conditiona∞ assembly¼á pagσ formattinτ features¼á anΣ ß macr∩ ì
  13. processo≥á whicΦá i≤á compatablσ witΦ thσ standarΣá Inte∞á definitioεá (MA├ ì
  14. implements the mid-1977 revision of Intel's definition).
  15.      MA├ require≤ approximatel∙ 12╦ oµ machinσ codσ anΣ tablσ space¼á alonτ ì
  16. with an additional 2.5K of I/O buffer space.
  17. :Executing MAC
  18.      MAC is invoked by the following command --
  19.                          MAC d:filename $parms
  20. Onl∙ 'filenameº i≤ required¼ anΣ i⌠ represent≤ ß filσ nameΣ 'filename.ASM'«  ì
  21. MA├á ma∙á theε generatσ u≡ t∩ │ othe≥ file≤ -- filename.HE╪ (thσ Inte∞á He° ì
  22. Forma⌠ File)¼á filename.PR╬ (thσ Prin⌠ o≥ Listinτ file)¼á anΣá filename.SY═ ì
  23. (a file containing a sorted list of the symbols used in the program).
  24.      MACR╧ Librar∙ file≤ ma∙ bσ referenceΣ b∙ thσ program╗á thesσ file≤ arσ ì
  25. named 'filename.LIB'.
  26.      $parm≤á represent≤ thσ optiona∞ assembl∙ contro∞ parameter≤ whicΦá arσ ì
  27. discussed in the next section.
  28.      MA├á ma∙ bσ executeΣ b∙ employinτ thσ SUBMI╘á filσá MAC.SUB«á  MAC.SU┬ ì
  29. assemble≤á thσá specifieΣ MA├ .AS═ file¼á convert≤ i⌠ int∩ ß .CO═ filσá viß ì
  30. LOAD, and erases the .HEX file.  MAC.SUB is invoked by --
  31.           SUBMIT MAC filename
  32. where 'filename' is the name of the MAC file 'filename.ASM'.
  33. :XMAC
  34.      XMA├á i≤ ß versioε oµ MA├ whicΦ doe≤ NO╘ recognizσ thσ intrinsiπ Inte∞ ì
  35. 808░ assemble≥ languagσ mnemonics«á  XMA├ i≤ intendeΣ t∩ bσ useΣ fo≥ Cross-ì
  36. Assembl∙á usinτá .LI┬ file≤ whicΦ contaiε thσ assemble≥ mnemonic≤á fo≥á thσ ì
  37. targe⌠á machine«á  XMA├ i≤ invokeΣ iε exactl∙ thσ samσ wa∙ MA├á i≤á (excep⌠ ì
  38. tha⌠á n∩ SUBMI╘ filσ i≤ available)¼á anΣ i⌠ recognize≤ thσ samσá pseudo-op≤ ì
  39. anΣ contro∞ parameters.
  40.      Thσ patcΦ filσ XMAC.AS═ contain≤ thσ patche≤ useΣ t∩ conver⌠ MA├á int∩ ì
  41. XMAC.
  42.      Thσáá librar∙á file≤á MAC40.LI┬á anΣá XMAC40.LI┬á contaiεá thσá macro≤ ì
  43. necessar∙ t∩ assemblσ codσ fo≥ thσ Inte∞ 404░ microprocessor¼á fo≥ example«  ì
  44. MAC40.LI┬ rename≤ thσ 404░ mnemonic≤ fo≥ ADD¼á SUB¼á etc.¼á t∩ ADD4¼á SUB4¼ ì
  45. etc.¼á s∩ tha⌠ i⌠ wil∞ no⌠ conflic⌠ witΦ MAC«á  XMAC40.LI┬ doe≤ no⌠á renamσ ì
  46. these, since XMAC does not recognize these in the first place.
  47. :Assembly Control Parameters
  48.      Thσ contro∞ paramete≥ lis⌠ i≤ precedeΣ b∙ ß $¼á anΣ ma∙ contaiε an∙ oµ ì
  49. the following in any order --
  50.           A - controls the source disk for the .ASM file
  51.           H - controls the destination of the .HEX machine code file
  52.           L - controls the source disk for the .LIB files
  53.           M - controls MACRO listing in the .PRN file
  54.           P - controls the destination of the .PRN listing file
  55.           Q - controls the listing of LOCAL symbolsè          S - controls the generation and destination of the .SYM file
  56.           1 - controls pass 1 listing
  57.  
  58.      Iε thσ casσ oµ thσ A¼á H¼ L¼ P¼ anΣ ╙ parameters¼ the∙ ma∙ bσ followeΣ ì
  59. b∙ thσ drivσ namσ froφ whicΦ t∩ obtaiε o≥ t∩ whicΦ t∩ senΣ data¼ wherσ --
  60.  
  61.           A,B,C,D -- designates that particular drive
  62.           P       -- designates the LST: device
  63.           X       -- designates the user console (CON:)
  64.           Z       -- designates a null file (no output)
  65.  
  66. For example,
  67.           $PB AA HB SX
  68. send≤á thσ .PR╬ filσ t∩ drivσ B:¼á get≤ thσ .AS═ filσ froφ drivσ A:¼á send≤ ì
  69. the .HEX file to drive B:, and sends the .SYM file to CON:.
  70.  
  71.      Thσ parameter≤ L¼á S¼á M¼ Q¼ anΣ ▒ ma∙ bσ precedeΣ b∙ eithe≥ ½ o≥ - t∩ ì
  72. enable or disable their respective functions --
  73.  
  74.      +L - list the input lines read from the MACRO library
  75.      -L - suppress listing of the MACRO library (default)
  76.  
  77.      +S - append the .SYM output to the end of the .PRN file (default)
  78.      -S - suppress the generation of the sorted symbol table
  79.  
  80.      +M - list all MACRO lines as they are processed (default)
  81.      -M - suppress all MACRO lines as they are processed
  82.      *M - list only HEX code generated by macro expansions in listing
  83.  
  84.      +Q - list all LOCAL symbols in the symbol list
  85.      -Q - suppress all LOCAL symbols in the symbol list (default)
  86.  
  87.      +1 - produce a listing file on the first pass (for MACRO debugging)
  88.      -1 - suppress listing on pass 1 (default)
  89.  
  90.      Thσá programme≥á caεá interspersσá control≤á throughou⌠á thσá assembl∙ ì
  91. languagσ sourcσ o≥ librar∙ files«á  IntersperseΣ control≤ arσ denoteΣ b∙á ß ì
  92. "$óá iεá thσá firs⌠á columε oµ thσ inpu⌠ linσá followeΣá immediatel∙á b∙á ß ì
  93. parameter.
  94. :Assembler Pseudo-Ops
  95.      The following Pseudo-Ops are supported --
  96.           DB        defines data bytes or strings of data
  97.           DS        reserves storage areas
  98.           DW        defines words of storage
  99.           ELSE      alternate to IF
  100.           END       terminates the physical program
  101.           ENDIF     marks the end of conditional assembly
  102.           ENDM      marks the end of a MACRO
  103.           EQU       performs a numeric "equate"
  104.           EXITM     abort expansion of the current MACRO level
  105.           IF        begins conditional assembly
  106.           IRP       INLINE MACRO with string substitution
  107.           IRPC      INLINE MACRO with character substitution
  108.           LOCAL     define LOCAL variables unique to each MACRO repetition
  109.           MACLIB    specify MACRO Library to load
  110.           MACRO     defines beginning of a MACRO
  111.           ORG       sets the program or data origin
  112.           PAGE      defines the listing page size for output
  113.           REPT      defines the beginning of a INLINE MACRO
  114.           SET       performs a numeric "set" or assignment
  115.           TITLE     enables page titles and options
  116. :Inline Error Messages
  117.      ┬á - Balancσá error║  MACR╧ doesn'⌠ terminatσ properl∙ o≥á conditiona∞ ì
  118. assembly is ill-formed
  119.      ├á - Commßá error║á  expressioεá wa≤á encountereΣá bu⌠á no⌠á delimiteΣ ì
  120. properly from the next item by a comma
  121.      ─ - Datσ error║  elemen⌠ iε ß datß statemen⌠ (DB,DW⌐ canno⌠ bσá placeΣ ì
  122. in the specified data area
  123.      E - Expression error:  expression is ill-formed and cannot be computed
  124.      I - Invalid character:  a non-graphic character has been found
  125.      L - Label error:  label cannot appear in this context
  126.      M - MACRO overflow error:  internal MACRO expansion table overflow
  127.      N - Not implemented error:  unimplemented feature used
  128.      ╧á - Overflo≈á error║  expressioε i≤ to∩ complicateΣ o≥ thσ numbe≥á oµ ì
  129. LOCAL labels has exceeded 9999
  130.      ╨á - Phasσá error║á  label≤ doe≤ no⌠ havσ samσ valuσá oεá botΦá passe≤ ì
  131. (multiple label)
  132.      ╥ - Registe≥ error║  valuσ specifieΣ fo≥ ß registe≥ i≤ no⌠á compatablσ ì
  133. with op code
  134.      S - Statement/Syntax error:  statement is ill-formed
  135.      V - Value error:  operand is improperly formed or out of range
  136. :Console Error Messages
  137.      NO SOURCE FILE PRESENT - .ASM file not found
  138.      NO DIRECTORY SPACE - Directory is full
  139.      SOURC┼á FIL┼ NAM┼ ERRO╥ - Thσ forφ oµ thσ sourcσ filσ namσ i≤ invalid╗ ì
  140. notσ tha⌠ MA├ i≤ invokeΣ b∙ 'MA├ filename'¼á anΣ thσ .AS═ filσ typσ i≤á NO╘ ì
  141. specified.
  142.      SOURCE FILE READ ERROR - Error in reading source file
  143.      OUTPUT FILE WRITE ERROR - Error in writing output fileè     CANNOT CLOSE FILE - An output file cannot be closed.
  144.      UNBALANCED MACRO LIBRARY - No ENDM encountered for a MACRO definition
  145.      INVALI─á PARAMETE╥ - InvaliΣ assembl∙ paramete≥ wa≤ founΣ iε thσ inpu⌠ ì
  146. line.
  147.