Future ISA: reverse-destination ALU ops (e.g. XOR [GH], A) #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently all ALU operations write their result into A:
XOR A, [GH]reads memory, XORs with A, and stores back into A.For a future ISA revision, consider reverse-destination forms like
XOR [GH], A— the operation is the same, but the result is written to the memory location pointed to by GH instead of A. A is left untouched. Flags are still affected.This would be most useful for the bitwise instructions (AND, OR, XOR) where you want to toggle, set, or clear bits in a memory location without disturbing the accumulator. Common use case: flipping flags or status bits in a device register or data structure in-place.
Could also apply to other ALU ops, but the bitwise ones are where the value is clearest.