beautypg.com

Rol4 – NEC 78K/0 Series User Manual

Page 81

background image

81

CHAPTER 5 EXPLANATION OF INSTRUCTIONS

User's Manual U12326EJ4V0UM

Rotate Left Digit

ROL4

Digit Rotation to the Left

[Instruction format]

ROL4 dst

[Operation]

A

3-0

(dst)

7-4

, (dst)

3-0

A

3-0

, (dst)

7-4

(dst)

3-0

[Operand]

Mnemonic

Operand(dst)

ROL4

[HL]

Note

Note Specify an area other than the SFR area as operand [HL].

[Flag]

Z

AC

CY

[Description]

The lower 4 bits of the A register and the 2-digit data (4-bit data) of the destination operand (dst) are rotated

to the left.

The higher 4 bits of the A register remain unchanged.

A

(HL)

7

4

3

0

7

4

3

0

Before Execution

0001

0010

0100

1000

After Execution

0001

0100

1000

0010

0

0

3

4

7

dst

3

4

7

A

[Description example]

ROL4 [HL];

Leftward digit rotation is executed with the memory contents specified by the A and HL registers.