joe7 wrote:
The book recommendation helped a lot, thank you. So far '<', '>', and '!' works. '$' already worked, but we still have to add '%' and '&', as well as directives for accumulator/index sizes on the 65816 (longa on/off, etc).
I've noticed that some listings have "LDA A" or "ROL A" etc, so I may add that also, although it seems redundant. Anything else I'm missing?
The MOS Technology standard assembler syntax required that all accumulator instructions other than implied have an operand. I no longer recall the exact reason why, but
ROL A in that standard means left-rotate the accumulator, with
A symbolically representing the accumulator. An instruction such as
LDX #A would cause a syntax error, as
A is a reserved symbol. I also recall that something like
A = 10 would cause an error, again because
A was reserved.
The supported radices in that standard are
% for binary,
@ for octal, none for decimal and
$ for hexadecimal. I believe those were "borrowed" from the Motorola 6800 assembly language for both political and practical reasons. The official MC68000 assembly language uses them as well.
The assembly language syntax described in the 65C816 data sheet largely continues the MOS Technology standard, with additional operators to accommodate 24 bit addressing and cases where one or two bytes of a 24 bit operand are needed. It's generally good practice to stick to publish standards and avoid the temptation to devise alternatives.