3 INSTRUCTION SET

RRC r

Rotate r-register right with carry

 

Source Format:

RRC r

 

 

 

 

 

 

 

 

 

 

Operation:

d3 C, d2

d3, d1

d2, d0

d1, C

d0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

1

1

0

1

0

0

0

1

1

r1

r0

 

E8CH to E8FH

 

MSB

 

 

 

 

 

 

 

LSB

 

Type:

V

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

5

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Set when the low-order bit of the r-register is 1; otherwise, reset.

Z– Not affected D – Not affected I – Not affected

Description: Shifts the contents of the r-register one bit to the right. The low-order bit is shifted into the carry flag and the carry bit becomes the high-order bit of the r-register.

 

 

 

r-register

 

C

 

 

 

 

r-register

C

 

 

 

d3

d2

d1

d0

 

C

 

 

 

 

 

 

C

d3

d2

d1

d0

 

 

 

 

 

 

 

 

Example:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RRC MY

 

 

 

Memory (MY)

 

1010

 

 

1101

 

 

 

 

 

 

C flag

 

1

 

 

 

0

 

 

 

 

 

RST F,i

Reset flags using immediate data i

 

Source Format:

RST F,i

 

Operation:

F

F i3 to i0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OP-Code:

 

1

 

1

1

1

0

1

0

1

i3

i2

i1

i0

F50H to F5FH

 

MSB

 

 

 

 

 

 

 

 

 

 

LSB

 

Type:

IV

 

 

 

 

 

 

 

 

 

 

 

 

Clock Cycles:

7

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag:

 

C – Reset if i0 is zero; otherwise, not affected.

Z– Reset if i1 is zero; otherwise, not affected. D – Reset if i2 is zero; otherwise, not affected. I – Reset if i3 is zero; otherwise, not affected.

Description: Performs a logical AND operation between immediate data i and the contents of the flags. The result is stored in each respective flag.

Example:

 

 

RST F,2

 

Flags (I,D,Z,C)

1010

 

0010

S1C6200/6200A CORE CPU MANUAL

EPSON

75