2) Add (W) - Hitachi H8/300H Series Programming Manual

Table of Contents

Advertisement

2.2.1 (2) ADD (W)

ADD (ADD binary)
Operation
Rd + (EAs) → Rd
Assembly-Language Format
ADD.W <EAs>, Rd
Operand Size
Word
Description
This instruction adds the source operand to the contents of a 16-bit register Rd (destination
operand) and stores the result in the 16-bit register Rd.
Available Registers
Rd:
R0 to R7, E0 to E7
Rs:
R0 to R7, E0 to E7
Operand Format and Number of States Required for Execution
Addressing
Mnemonic
Mode
Immediate
ADD.W
Register direct
ADD.W
Notes
Condition Code
H: Set to 1 if there is a carry at bit 11;
N: Set to 1 if the result is negative; otherwise
Z: Set to 1 if the result is zero; otherwise
V: Set to 1 if an overflow occurs; otherwise
C: Set to 1 if there is a carry at bit 15;
Operands
1st byte
#xx:16, Rd
7
9
Rs, Rd
0
9
43
I
UI H
U
— —
otherwise cleared to 0.
cleared to 0.
cleared to 0.
cleared to 0.
otherwise cleared to 0.
Instruction Format
2nd byte
3rd byte
1
rd
IMM
rs
rd
Add Binary
N
Z
V
C
No. of
States
4th byte
4
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents