/* Assembly language syntax for SuBAsm. */ /* Comments begin with "/*", and end with "*/". * Directives begin with a `\`. */ /* mnemonic is the instruction name/mnemonic. * expr is an expression. * Indirect Indexed means applying the index after the indirection. * Indexed Indirect means applying the index before the indirection. */ Expression syntax: /* TODO */ Instruction syntax: Base ISA, and Base Extension: Implied: B register: b Absolute/Zero Matrix: /* [, ] means Indexed with x, or y. */ [, ] Immediate Data: # Absolute/Zero Matrix Indirect: /* Indexing with x means Indexed Indirect. * Indexing with y means Indirect Indexed. */ ([, x])[, y] E Indirect: (e) Orthogonal Extension: [, operand] Operand syntax: <\( /* The operand starts with a register. * If the statment is inside brackets, then * it's a register indirect mode. */ [(]reg[+][\(+|-\)][)] /* The operand starts with an expression. * If the statment is inside brackets, then * it's an indirect mode. */ |[(]expr /* Is the operand using Indirect, or Indirect Indexed? */ \if (ind || ind_indexed) { [)] \} [\(+|-\)]>] /* Is the operand using Indexed Indirect? */ \if (indexed_ind) { [)] \} \)>