RCR

RCR, RCRP, DRCR, DRCRP

 

RCR instruction rotates the (D) data source towards the right by (n) bits with carry flag (F112).

  • RCR(RCRP) is for 16bit source and DRCR(DRCRP) is for 32bit source.

 

 

D

Source

n

Number of bits to move right

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

 

Error

Zero

Carry

RCR(P)

DRCR(P)

D

o

-

o

o

o

-

o

o

-

o

o

o

-

3

o

-

o

n

o

o

o

o

o

o

o

o

-

o

o

o

o

 

Example)

If F93 is ON, the RCRP instruction moves 1bit to the right side within Y20 (16bit) by every 1 sec.

The lowest bit (b0) moves to carry flag and the carry flag moves to the highest bit (b15).