DEC (IY+d)

Operation

(IY+d) <- (IY+d) - 1

Mnemonic

DEC

Operands

(IY+d)

b7b6b5b4b3b2b1b0
1 1 1 1 1 1 0 1$FD
0 0 1 1 0 1 0 1$35
d

Description

The contents of Index Register IY (register pair IY) are added to the two's-complement displacement integer, d, to point to an address in memory. The contents of this address are then decremented.

Condition Bits Affected

Sis set if result is negative, otherwise it is reset.
Zis set if result is 0, otherwise it is reset.
His set if borrow from bit 4, otherwise it is reset.
P/Vis is set if (IY+d) was $80 before operation, otherwise it is reset.
Nis set.
Cis not affected.

Example

If Index Register IY are $2020 and memory location $2030 contains byte $34, then upon execution of

	DEC	(IY+$10)

memory location $2030 contains $33.