home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / program / xasm.arc / XASM68K.HLP < prev    next >
Encoding:
Text File  |  1990-08-26  |  8.3 KB  |  233 lines

  1. Invoking XASM68K.COM 
  2. Pseudo-ops
  3. Register referencing
  4. Labels
  5. Assembly options
  6. Comment fields
  7. Overriding automatic size determination
  8. Symbols
  9. Constants
  10. Strings
  11. Operator precedence
  12. Automatic conversions
  13. Addressing mode syntax interpretation
  14. :Command line to invoke the assembler
  15.           
  16.                   XASM68K <filename>                   ; short form
  17.                   XASM68K <object>,<listing>=<source>  ; full form
  18.           
  19.                   ----------------- Equivalence ----------------
  20.           
  21.                   XYZ                 XYZ.HEX,XYZ.PRN=XYZ.ASM
  22.                   ,CON:=XYZ           NUL:,CON:=XYZ.ASM
  23.                   XYZ,=XYZ            XYZ.HEX,NUL:=XYZ.ASM
  24.                   XYZ.OBJ=XYZ.SRC     XYZ.OBJ,XYZ.PRN=XYZ.SRC
  25.                   ,CON:=CON:          NUL:,CON:=CON:
  26.           
  27.                   Object file may be in Motorola S-record (default)
  28.                   or Intel HEX format.
  29.          
  30. :Pseudo-ops
  31.  
  32.          
  33.           <symbol>  SET   <expression>            ; temp val
  34.           <symbol>  EQU   <expression>            ; perm val
  35.           <symbol>  REG   <register expression>   ; perm val
  36.           
  37.                   Note that a size attribute may be tacked onto
  38.                   SET or EQU to govern the way string constants
  39.                   appearing in the expression are handled.  The
  40.                   default size is long.  String  constants  are
  41.                   left justified  according  to  size  and zero
  42.                   filled.
  43.           
  44.  
  45. :Register referencing
  46.  
  47.  
  48.           <register expression>          for use in MOVEM
  49.                   <Rn>    <next reg>
  50.           
  51.           <next reg>
  52.                   - <Rn>   <next reg>
  53.                   /        <register expression>
  54.           
  55.           <Rn>
  56. è                  A <rnum>
  57.                   D <rnum>
  58.           
  59. :Labels
  60.  
  61.           
  62.           Labels are symbols which receive the current value of
  63.                   the program counter.
  64.                   For labels beginning in column 1, colon is optional.
  65.                   For labels preceded by blanks,    colon is required.
  66.           
  67. :Assembly options
  68.  
  69.           
  70.                     OPT   <option>,<option>,.....
  71.           
  72.           <option>
  73.                   BRL     ; long  branch forward ref. - default
  74.                   BRS     ; short branch forward ref.
  75.                   FRL     ; long  absolute fwd. ref.  - default
  76.                   FRS     ; short absolute fwd. ref.
  77.                   OBJ-S   ; hex file Motorola style   - default
  78.                   OBJ-H   ; hex file Intel style (16 bit address limit)
  79.                   NOP1L   ; no pass 1 listing         - default
  80.                   P1L     ;    pass 1 listing
  81.           
  82. :Comment fields
  83.  
  84.           
  85.           * <comment>
  86.           
  87. :Overriding automatic size determination
  88.  
  89.           
  90.            .S & .L  may be appended to BRA, BSR, Bcc, JMP and JSR
  91.                   to override automatic size determination.
  92.                   They  may  also  be   appended  to  absolute  address
  93.                   operands in other instructions.  But, it is necessary
  94.                   to isolate  the  period  from a  symbol  by enclosing
  95.                   the symbol in parentheses.  This  is  due to the fact
  96.                   that period is a valid character in symbols.
  97.  
  98. :Symbols
  99.           
  100.           
  101.           <symbol>
  102.                   Symbols begin with a letter or period.  Additional
  103.                   characters may be letters, digits, periods, dollar
  104.                   signs and underscores.
  105.           
  106.                   * represents the program counter
  107.           
  108.                   Symbols may have up to 31 significant characters.
  109.           
  110.                   The symbol table is currently of fixed size:
  111. è                           500 Symbols max
  112.                           2000 Characters max
  113.           
  114. :Constants
  115.  
  116.           
  117.           Constants begin with
  118.                   char    - '
  119.                   hex     - $
  120.                   octal   - @
  121.                   binary  - %
  122.                   decimal - 0 thru 9
  123.           
  124. :Strings
  125.  
  126.           
  127.           Strings:
  128.                   Delimited by '
  129.                   '' represents '
  130.           
  131. :Operator precedence
  132.  
  133.           Expressions and symbols are classified as constants
  134.                   or addresses.
  135.           
  136.           Operators for expressions (in precedence group order)
  137.           
  138.                   + -
  139.           
  140.                   * /        only implemented for 16 bits now
  141.                   \          mod - only 16 bits for now
  142.           
  143.                   &          AND
  144.                   ! |        both allowed for OR
  145.                   ^          exclusive OR
  146.           
  147.                   <<         shift left
  148.                   >>         shift right
  149.  
  150.                   -          unary minus
  151.                   ~          unary NOT
  152.                   Except for + and -,  only  expressions  which evaluate
  153.                   constants are allowed as  operands to  operators.  For
  154.                   + and -, (a + a) and (c - a) produce errors.  Embedded
  155.                   spaces are not allowed in expressions (spaces serve as
  156.                   field delimiters).
  157. :Automatic conversions
  158.  
  159.           
  160.                   ADD     #e   ,<ea>      ADDQ or ADDI when possible
  161.                           <ea> ,An        ADDA
  162.           
  163.                   SUB     #e   ,<ea>      SUBQ or SUBI when possible
  164.                           <ea> ,An        ADDA
  165.           
  166.                   CMP     #e   ,<ea>      CMPI when possible
  167.                           (An)+,(An)+     CMPM
  168.                           <ea> ,An        CMPA
  169.           
  170.                   AND     #e   ,<ea>      ANDI when possible
  171.           
  172.                   OR      #e   ,<ea>      ORI  when possible
  173.           
  174.                   EOR     #e   ,<ea>      EORI when possible
  175. :Addressing Mode Syntax Interpretation
  176.  
  177.                           c  expression must evaluate to constant
  178.                           a  expression must evaluate to address
  179.                           b  expression may  evaluate to either
  180.           
  181.               Syntax used            Interpreted as    Mode,reg
  182.  
  183.                   # e                     #c              7,4
  184.           
  185.                   D n                     Dn              0
  186.           
  187.                   A n                     An              1
  188.           
  189.                   - ( A n )               -(An)           4
  190.           
  191.                   ( A n ) +               (An)+           3
  192.           
  193.                   ( A n )                 (An)            2
  194.               Syntax used            Interpreted as    Mode,reg
  195.  
  196.                   ( A n , R i )
  197.                   ( A n , R i . W )       0(An,Ri.s)      6
  198.                   ( A n , R i . L )
  199.           
  200.                   e ( A n , R i )
  201.                   e ( A n , R i . W )     c(An,Ri.s)      6
  202.                   e ( A n , R i . L )
  203.           
  204.                   e ( A n )               c(An)           5
  205.           
  206.                   e ( D i )
  207.  
  208.                   e ( R i . W )           a(PC,Ri.s)      7,3
  209.                   e ( R i . L )
  210.           
  211.               Syntax used            Interpreted as    Mode,reg
  212.  
  213.                   e ( PC , R i )
  214.                   e ( PC , R i . W )      a(PC,Ri.s)      7,3
  215.                   e ( PC , R i . L )
  216.           
  217.                   e ( PC )                a(PC)           7,2
  218.           
  219.                   e . L                   b.L             7,1          **
  220.           
  221.                   e . S                   b.S             7,0          **
  222.           
  223.                   e                       b               7,0 or 7,1   **
  224.           
  225. ***¬   S╨ ma∙ bσ useΣ fo≥ A╖ anywherσ Aε appears¼á bu⌠ no⌠ wherσ RΘ appear≤ ì
  226. fo≥ inde° specification.
  227.           
  228. *¬á     Explici⌠á  rangσ   specificatioε   viß   (.╙ o≥ .L⌐ override≤á  thσ  ì
  229. automatiπá rangσ  selectioε  fo≥  absolutσ addressing«á  Fo≥ auto¼á iµá thσ ì
  230. expressioε contain≤ forwarΣ references¼á thσ  rangσ i≤  determineΣ b∙á  thσ ì
  231. "FRóá optioεá currentl∙á iε  effec⌠  (FR╠ default)«á   Iµá  thσá expressioε ì
  232. contain≤  n∩  forwarΣ references¼ thσ rangσ i≤ madσ shor⌠ iµ thσ expressioε ì
  233. lie≤ betweeε -3276╕ anΣ +32767.
  234.           
  235.