negx
Negate with extend
Replaces the destination with zero minus its value minus X, at the instruction’s size.
Sizes .b .w .l, .w by default
XNZVC ●●●●●
- ● depends on the result
- Reads X
Forms
Operands
<ea>- An operand using one of the addressing modes listed for this form. The list determines whether it can be a register, memory or an immediate value. With
opt p=68020, an allowedd(An,Xn)ord(PC,Xn)mode also permits the corresponding 68020 indexed and memory indirect forms. See 68020 addressing. More
To negate a value split into several parts, process the least significant part first so X carries a borrow into the next part.
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 the whole result is zero.