lb3361 wrote: ↑21 Mar 2021, 11:21
- ADDB z : Adds the byte at zero page address z to the 16 bits vAC.
I haven't updated the original list, but I have since added, (vAC denotes full 16bits of vAC):
ADDBA var: vAC += var.lo, 28 cycles, (carry aware)
SUBBA var: vAC -= var.lo, 28 cycles, (borrow aware)
ADDBI var, imm: var.lo += imm, 28 cycles
SUBBI var, imm: var.lo -= imm, 28 cycles
ANDBI var, imm: var.lo &= imm, 28 cycles
ORBI var, imm: var.lo |= imm, 28 cycles
DEEKX var: Deek word at address contained in var, var.lo += 2, 30 cycles
I have found DEEKX, (as well as ADDBA), to be extremely useful.
The XXXBI instructions replace the LD/LDW OP ST, (when src=dst), pattern with one instruction, (which means you can set and reset bit flags in byte vars with one instruction), XOR and NOT are missing and I might try to find room for them at a later stage, (they haven't been a priority so far as the code generated by my compiler and my hand crafted stuff hasn't needed them).
I am still looking for one more free instruction slot for DOKEX, (but it's not a priority for now).