n---------------m
n--m | n----------m |
|CY|<-T-|7<-------0|<-u
v--u v----------u
(IY+d)
RLC
(IY+d)
| b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | $FD |
| 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | $CB |
| d | ||||||||
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | $06 |
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 left 1 bit position. The contents of bit 7 are copied to the Carry flag and also to bit 0. Bit 0 is the least-significant bit.
| S | is set if result is negative, otherwise it is reset. |
| Z | is set if result is 0, otherwise it is reset. |
| H | is reset. |
| P/V | is set if parity even, otherwise it is reset |
| N | is reset. |
| C | is data from bit 7 of source register. |
Index Register IY contains $1000 and the contents of memory location $1002 are:
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Upon the execution of
RLC (IY+$2)
memory location $1002 and the Carry flag now contain:
| C | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |