beautypg.com

Accumulator manipulation instructions, Increment/decrement instructions – NEC PD750008 User Manual

Page 299

background image

279

CHAPTER 11 INSTRUCTION SET

11.4.5 Accumulator Manipulation Instructions

RORC A

Function: CY <- A

0

, A

n-1

<- A

n

, A

3

<- CY (n = 1–3)

Rotates the contents of the A register (4-bit accumulator) through the carry flag one bit position to the right.

NOT A

Function: A <– A

Obtains the one’s complement of the A register (4-bit accumulator), that is, inverts each bit of the A register.

11.4.6 Increment/Decrement Instructions

INCS reg

Function: reg <– reg+1 ; Skip if reg = 0

Increments the contents of register reg (X, A, H, L, D, E, B, C). If the result of increment produces reg =

0, the immediately following instruction is skipped.

INCS rp1

Function: rp1 <– rp1+1 ; Skip if rp1 = 00H

Increments the contents of register pair rp1 (HL, DE, BC). If the result of increment produces rp1 = 00H,

the immediately following instruction is skipped.

INCS @HL

Function: (HL) <– (HL)+1 ; Skip if (HL) = 0

Increments the data at the data memory location addressed by the HL register pair. If the result of increment

produces data that is 0, the immediately following instruction is skipped.

0

CY

0

3

1

2

0

1

1

0

Before
execution

1

0

0

1

0

After
execution

••

••

••

••

RORC A

A

This manual is related to the following products: