subx
Subtract extended
Subtracts the source and X flag from the destination, and stores the result in the destination.
Sizes .b .w .l, .w by default
XNZVC ●●●●●
- ● depends on the result
- Reads X
Forms
subx ,subx ,
Operands
Both operands must be data registers, or both must use predecrement addressing. The registers need not be the same. For a value split into several parts, start with the least significant part so X carries each borrow into the next subtraction.
Z is cumulative: a zero result preserves its previous value, and a nonzero result clears it. Set Z and clear X before the first part, for example with move.w #4, ccr. Z then remains set only if every result part is zero. C and X report the borrow from the current part.