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 (see Preprocessing).
The XGATE assembler does not currently support a line separator character.
The following addressing modes are understood for XGATE:
The register can be either ‘R0’, ‘R1’, ‘R2’, ‘R3’, ‘R4’, ‘R5’, ‘R6’ or ‘R7’.
Convience macro opcodes to deal with 16-bit values have been added.
For example:
ldw R1, #1024 ldw R3, timer ldw R1, (R1, #0) COM R1 stw R2, (R1, #0)