beautypg.com

Arithmetic and logic instructions, Adds a, #n4, Adds a, @hl – NEC PD75402A User Manual

Page 174: Addc a, @hl, And a, @hl

background image

163

CHAPTER 9. INSTRUCTION SET

9.4.3

Arithmetic and Logic Instructions

ADDS A, #n4

Function: A

A + n4; Skip if carry; n4 = I

3

to I

0

: 0 to FH

Binary adds 4-bit immediate data n4 to the contents of the A register and skips the next instruction if a carry

is generated. The carry flag is not affected.

When combined with an ADDC A, @HL instruction, this instruction becomes a base correction instruction.

(See section 9.1.)

ADDS A, @HL

Function: A

A + (HL); Skip if carry

Binary adds the data memory contents addressed by register pair HL to the contents of the A register and

skips the next instruction if a carry is generated. The carry flag is not affected.

ADDC A, @HL

Function: A, CY

A + (HL) + CY

Binary adds the data memory contents addressed by register pair HL to the contents of the A register,

including the carry flag. If a carry is generated, the carry flag is set. If a carry is not generated, the carry flag

is reset.

When an ADDS A, #n4 instruction is placed after this instruction, when a carry is generated at this instruction,

the ADDS A, #n4 instruction is skipped. When a carry is not generated, the ADDS A, #n4 instruction is executed

and the skip function of the ADDS A, #n4 instruction is disabled. Therefore, the combination of these

instructions can be used in base correction (see section 9.1).

AND A, @HL

Function: A

A

(HL)

ANDs the contents of the A register and the data memory contents addressed by register pair HL and sets

the result into the A register.

This manual is related to the following products: