DEC Instruction

Integer OVerflow
Purpose:To subtract one from an integer
Format:opcode dif.mx
Operation:dif <- dif - 1;
Condition
Codes:
N <- dif LSS 0;
Z <- dif EQL 0;
V <- {integer overflow};
C <- {borrow from the most significant bit};
Exceptions:
Opcodes:
97DECBDecrement Byte
B7DECWDecrement Word
D7DECLDecrement Long
Description: One is subtracted from the difference operand and the difference operand is replaced by the result.
Notes:
1.
Integer overflow occurs if the largest negative number is decremented. On overflow, the difference operand is replaced by the largest positive number.
2.
DECx dif is equivalent to SUBx #1, dif, but is one byte shorter.