beautypg.com

NEC 78K/0 Series User Manual

Page 76

background image

76

CHAPTER 5 EXPLANATION OF INSTRUCTIONS

User's Manual U12326EJ4V0UM

Rotate Right

ROR

Byte Data Rotation to the Right

[Instruction format]

ROR dst, cnt

[Operation]

(CY, dst

7

dst

0

, dst

m–1

dst

m

)

× one time

[Operand]

Mnemonic

Operand(dst,cnt)

ROR

A, 1

[Flag]

Z

AC

CY

×

[Description]

The destination operand (dst) contents specified by the 1st operand are rotated to the right just once.

The LSB (bit 0) contents are simultaneously rotated to MSB (bit 7) and transferred to the CY flag.

[Description example]

ROR A, 1; The A register contents are rotated one bit to the right.

CY

0

7