--- UCOMP source format:

* = Comment
First non-* line: CPU_LONG CPU_SHORT <registers>
name1                           ; Define synonym name for following def
name2   operand(s)              ; Define equivlent instruction for following
name3   operand(s)  opcode...   ; Define instruction and definitions
name4   -           opcode...   ; Use '-' for no operands
name5 {                         ; Instruction definition (1st/2nd pass code)
 code for first pass....
$                               ; Signals pass2 code
 code for second pass...
}                               ; End of definition
{                               ; Start of global declarations
 declarations for globals...
}                               ; End of global declarations
#name [definition]              ; Define control symbol

Operands:
    @   = Direct value
    #   = Immediate value
    >   = 16 bit modifier
    <   = 8 bit modifier
    X   = Register name

Opcodes:
    xx  = HEX value
    @oo = Octal value
    %bb = Binary value
    >   = 16 bit modifier
    <n  = 8 bit modifier
    ^   = reverse modifier (high=low, low=high)
    $   = PC relative modifier
    ~n  = Internal variable (1-4) (set with user[n] = value)
    n   = (after modifiers) operand value (0-4)

--- Control symbols
#NULLOP     - Allow NULL first operand, otherwise 0 assumed
#LENDIAN    - For LITTLE ENDIAN processor (low byte first)
#RELCOMP    - Sets relative address calculation
; Default (below) calculated from end of instruction
#RELCOMP    addr + length + (l & 0x40) ? 2 : 1


--- UASM internals:
Instruction table format:

    name flag id

    name:
        ASCII name of instruction

    flag: (0xFF = EQU identified by id, 0xFE = User defined)
        bit7 = 1
        bit 6-0 high byte of id
    id: bit 7-0 low byte of id

Operand Table format:

  Sizeflags
  flaglen operand12 operand23 [opcode] [operands] ...

    Sizeflags:
        bit 7   - 0
        bit 3   - Value 16 allowed
        bit 2   - Value 8 allowed
        bit 1   - Immediate 16 allowed
        bit 0   - Immediate 8 allowed

    Flaglen:
        bit 7   - 1
        bit 6-4 - opcode length (0 = use next opcode)
        bit 3-0 - Instruction definition length (0 = use next opcode)

    operand nibble:
        0 = None
        1 = Immed8      <#
        2 = Immed16     >#
        3 = Value8      <@
        4 = Value16     >@
        5+= Keyword+5

    opcode:
        Databytes for opcode

    operands:
        Bit 7   - Special (ID is bits 6-0)
                0 = Insert opcode byte as follows:
        Bit 6   - Value is 16 bit
        Bit 5   - Reverse (use HIGH byte)
        Bit 4   - Value is PC relative
        Bits3-0 - Argument number
