The Rabbit assembler syntax as documented in the manual has a few quirks. These include:
- Rabbit 2000 ljp / lcall x, mn: These jump to a 20/24-bit address. But the official syntax has a comma in between the MSB and the rest of the address. IMO, it would make sense to also accept a single-operand version with a 24-bit address.
- Rabbit 4000 lljp / llcall (cc,/cx,) lxpc, mn: These jump to a 32/28/24-bit address. Similar as above, with a comma in between the upper 12 bits and the lower 16 bits in the official syntax.
- Rabbit 4000 rlc / rrc / sll / sla / srl bb, rrrr: The official syntax has the destination operand on the right, while other instructions have it on the left. We should support the destination operand on the right (no ambiguitiy, since bb is always an immediate, while rrrr is a 32-bit register).
- Rabbit 6000 swap r: IMO, we should use mirror as mnemonic instead of swap (and not support the swap mnemonic at all). Calling it swap is confusing, since other Z80 derivatives use swap for swapping the nibbles, and Z80N already has mirror for the semantics of this instruction.
On the other hand, for the rlc/rrc/sll/sla/srl bb, rrrr, we do have precendent for the syntax via the bit/set/res b, r instructions. So maybe it makes more sense to stay with the syntax from the Rabbit manual? But on the other hand, the syntax from the rabbit manual has the operands swapped vs. the already-supported Z80N bsla/bsra/bsrl/bsrf/brlc de, b. Maybe we should just support both the Rabbit-style and Z80N-style operand order for the Rabbits?
Diff: