3.5 Instruction Set
3.5.1 Overview
The main features of the CPU instruction set are:
A general-register architecture.
Orthogonality. Addressing modes and data sizes can be specified independently in each instruction.
1.5 addressing modes (supporting register-register and register-memory operations)
Affinity for high-level languages, particularly C, with short formats for frequently-used
instructions and addressing modes.
The CPU instruction set includes 63 types of instructions, listed by function in table 3-9.
Table 3-9 Instruction Classification
* Bcc is a conditional branch instruction in which cc represents a condition code.
Tables 3-10 to 3-16 give a concise summary of the instructions in each functional category. The
MOV, ADD, and CMP instructions have special short formats, which are listed in table 3-17. For
detailed descriptions of the instructions, refer to the
H8/500 Series Programming Manual
.
The notation used in tables 3-10 to 3-17 is defined below.
Function
Data transfer
Arithmetic operations
Instructions
MOV, LDM, STM, XCH, SWAP, MOVTPE, MOVFPE
ADD, SUB, ADDS, SUBS, ADDX, SUBX, DADD, DSUB,
MULXU, DIVXU, CMP, EXTS, EXTU, TST, NEG, CLR,
TAS
AND, OR, XOR, NOT
SHAL, SHAR, SHLL, SHLR, ROTL, ROTR, ROTXL,
ROTXR
BSET, BCLR, BTST, BNOT
Bcc*, JMP, PJMP, BSR, JSR, PJSR, RTS, PRTD,
PRTS, RTD, SCB (/F, /NE, /EQ)
TRAPA, TRAP/VS, RTE, SLEEP, LDC, STC, ANDC,
ORC, XORC, NOP, LINK, UNLK
Types
7
17
Logic operations
Shift
4
8
Bit manipulation
Branch
4
11
System control
12
Total
63
50