as: XGATE-Syntax

 
 9.52.2 Syntax
 -------------
 
 In XGATE RISC syntax, the instruction name comes first and it may be
 followed by up to three operands.  Operands are separated by commas
 (',').  'as' will complain if too many operands are specified for a
 given instruction.  The same will happen if you specified too few
 operands.
 
      nop
      ldl  #23
      CMP  R1, R2
 
    The presence of a ';' character or a '!' character anywhere on a line
 indicates the start of a comment that extends to the end of that line.
 
    A '*' or a '#' character at the start of a line also introduces a
 line comment, but these characters do not work elsewhere on the line.
 If the first character of the line is a '#' then as well as starting a
 comment, the line could also be logical line number directive (See
 Comments) or a preprocessor control command (SeePreprocessing).
 
    The XGATE assembler does not currently support a line separator
 character.
 
    The following addressing modes are understood for XGATE:
 "Inherent"
      ''
 
 "Immediate 3 Bit Wide"
      '#NUMBER'
 
 "Immediate 4 Bit Wide"
      '#NUMBER'
 
 "Immediate 8 Bit Wide"
      '#NUMBER'
 
 "Monadic Addressing"
      'REG'
 
 "Dyadic Addressing"
      'REG, REG'
 
 "Triadic Addressing"
      'REG, REG, REG'
 
 "Relative Addressing 9 Bit Wide"
      '*SYMBOL'
 
 "Relative Addressing 10 Bit Wide"
      '*SYMBOL'
 
 "Index Register plus Immediate Offset"
      'REG, (REG, #NUMBER)'
 
 "Index Register plus Register Offset"
      'REG, REG, REG'
 
 "Index Register plus Register Offset with Post-increment"
      'REG, REG, REG+'
 
 "Index Register plus Register Offset with Pre-decrement"
      'REG, REG, -REG'
 
      The register can be either 'R0', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6'
      or 'R7'.
 
    Convene macro opcodes to deal with 16-bit values have been added.
 
 "Immediate 16 Bit Wide"
      '#NUMBER', or '*SYMBOL'
 
      For example:
 
           ldw R1, #1024
           ldw R3, timer
           ldw R1, (R1, #0)
           COM R1
           stw R2, (R1, #0)