RRC (IY+d)

Operation

n---------------m
|  n----------m |  n--m
v->|7------->0|-T->|CY|
   v----------u    v--u
      (IY+d)

Mnemonic

RRC

Operands

(IY+d)

b7b6b5b4b3b2b1b0
1 1 1 1 1 1 0 1$FD
1 1 0 0 1 0 1 1$CB
d
0 0 0 0 1 1 1 0$0E

Description

The contents of the memory address specified by the sum of the contents of Index Register IY and the two's-complement displacement integer, d, are rotated right 1 bit position. The contents of bit 0 are copied to the Carry flag and also to bit 7.

Condition Bits Affected

Sis set if result is negative, otherwise it is reset.
Zis set if result is 0, otherwise it is reset.
His reset.
P/Vis set if parity even, otherwise it is reset
Nis reset.
Cis data from bit 0 of source register.

Example

Index Register IY contains $1000 and the contents of memory location $1002 are:

76543210
00110001

Upon the execution of

	RRC	(IY+d)

memory location $1002 and the Carry flag now contain:

76543210C
100110001