In particular, the stack pointer (R7) is not initialized. To prevent program crashes the stack
pointer should be initialized by software, by the first instruction executed after a reset.
1.3 Instructions
Features:
•
The H8/300 has a concise set of 57 RISC-like instructions.
•
Arithmetic and logic are performed as register-to-register operations, or with immediate
data.
•
All instructions are 2 or 4 bytes long.
•
Fast multiply/divide instructions; extensive bit manipulation instructions.
•
Eight addressing modes.
1.3.1 Types of Instructions
Table 1-2 classifies the H8/300 instructions by type. Tables 1-3 to 1-10 briefly describe their
functions. Section 2, Instruction Set, gives detailed descriptions.
Table 1-2. Instruction Classification
Function
Data transfer
Arithmetic operations ADD, SUB, ADDX, SUBX, INC, DEC, ADDS, SUBS,
Logic operations
Shift
Bit manipulation
Branch
System control
Block data transfer
* POP Rn is equivalent to MOV.W @SP+, Rn.
PUSH Rn is equivalent to MOV.W Rn, @-SP.
** Bcc is a conditional branch instruction in which cc represents a condition .
MOV, MOVFPE, MOVTPE, POP*, PUSH*
DAA, DAS, MULXU, DIVXU, CMP, NEG
AND, OR, XOR, NOT
SHAL, SHAR, SHLL, SHLR, ROTL, ROTR, ROTXL,
ROTXR
BSET, BCLR, BNOT, BTST, BAND, BIAND, BOR
BIOR, BXOR, BIXOR, BLD, BILD, BST, BIST
Bcc**, JMP, BSR, JSR, RTS
RTE, SLEEP, LDC, STC, ANDC, ORC, XORC, NOP
EEPMOV
Instructions
8
Types
3
14
4
8
14
5
8
1
Total 57