
Section 2 CPU
Rev. 6.00 Sep 12, 2006 page 33 of 526
REJ09B0326-0600
2.5.2 Arithmetic
Operations
Table 2.5 describes the arithmetic instructions.
Table 2.5
Arithmetic Instructions
Instruction Size
*
Function
ADD
SUB
B/W
Rd ± Rs
→
Rd, Rd + #IMM
→
Rd
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
SUBX
B
Rd ± Rs ± C
→
Rd, Rd ± #IMM ± C
→
Rd
Performs addition or subtraction with carry on data in two general
registers, or addition or subtraction with carry on immediate data and
data in a general register.
INC
DEC
B
Rd ± 1
→
Rd
Increments or decrements a general register
ADDS
SUBS
W
Rd ± 1
→
Rd, Rd ± 2
→
Rd
Adds or subtracts 1 or 2 to or from a general register
DAA
DAS
B
Rd decimal adjust
→
Rd
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, and indicates the result in the CCR.
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
Notes:
*
Size: Operand
size
B:
Byte
W:
Word
Summary of Contents for F-ZTAT H8/3642A Series
Page 6: ...Rev 6 00 Sep 12 2006 page iv of xx ...
Page 8: ...Rev 6 00 Sep 12 2006 page vi of xx ...
Page 22: ...Rev 6 00 Sep 12 2006 page xx of xx ...
Page 124: ...Section 5 Power Down Modes Rev 6 00 Sep 12 2006 page 102 of 526 REJ09B0326 0600 ...
Page 188: ...Section 6 ROM Rev 6 00 Sep 12 2006 page 166 of 526 REJ09B0326 0600 ...
Page 190: ...Section 7 RAM Rev 6 00 Sep 12 2006 page 168 of 526 REJ09B0326 0600 ...
Page 298: ...Section 9 Timers Rev 6 00 Sep 12 2006 page 276 of 526 REJ09B0326 0600 ...
Page 378: ...Section 12 A D Converter Rev 6 00 Sep 12 2006 page 356 of 526 REJ09B0326 0600 ...
Page 446: ...Section 13 Electrical Characteristics Rev 6 00 Sep 12 2006 page 424 of 526 REJ09B0326 0600 ...