3.5.2 Arithmetic Operations
Table 3-5 describes the arithmetic instructions. See figure 3-6 in section 3.5.4, “Shift Operations”
for their object codes.
Table 3-5. Arithmetic Instructions
Note: * Size: operand size
B: Byte
W: Word
Instruction
Size*
Function
ADD
B/W
Rd ± Rs
→
Rd, Rd + #imm
→
Rd
SUB
Performs addition or subtraction on data in two general registers, or
addition on immediate data and data in a general register. Immediate
data cannot be subtracted from data in a general register. Word data can
be added or subtracted only when both words are in general registers.
ADDX
B
Rd ± Rs ± C
→
Rd, Rd ± #imm ± C
→
Rd
SUBX
Performs addition or subtraction with carry or borrow on byte data in
two general registers, or addition or subtraction on immediate data and
data in a general register.
INC
B
Rd ± #1
→
Rd
DEC
Increments or decrements a general register.
ADDS
W
Rd ± #imm
→
Rd
SUBS
Adds or subtracts immediate data to or from data in a general register.
The immediate data must be 1 or 2.
DAA
B
Rd decimal adjust
→
Rd
DAS
Decimal-adjusts (adjusts to packed BCD) an addition or subtraction
result in a general register by referring to the CCR.
MULXU
B
Rd
×
Rs
→
Rd
Performs 8-bit
×
8-bit unsigned multiplication on data in two general
registers, providing a 16-bit result.
DIVXU
B
Rd ÷ Rs
→
Rd
Performs 16-bit ÷ 8-bit unsigned division on data in two general
registers, providing an 8-bit quotient and 8-bit remainder.
CMP
B/W
Rd – Rs, Rd – #imm
Compares data in a general register with data in another general register
or with immediate data. Word data can be compared only between two
general registers.
NEG
B
0 – Rd
→
Rd
Obtains the two’s complement (arithmetic complement) of data in a
general register.
40
Содержание H8/326 Series
Страница 67: ...58 ...
Страница 121: ...112 ...
Страница 274: ... 3 Clock Settling Timing Ø VCC RES STBY tOSC1 tOSC1 Figure 14 8 Clock Setting Timing 265 ...
Страница 279: ...270 ...