HD6475328-CP10 HITACHI [Hitachi Semiconductor], HD6475328-CP10 Datasheet - Page 115

no-image

HD6475328-CP10

Manufacturer Part Number
HD6475328-CP10
Description
original Hitachi CMOS microcomputer unit (MCU)
Manufacturer
HITACHI [Hitachi Semiconductor]
Datasheet
4.9.1 PC Value Pushed on Stack for Trace, Interrupts, Trap Instructions, and Zero Divide
Exceptions
The program counter value pushed on the stack for a trace, interrupt, trap, or zero divide exception
is the address of the next instruction at the time when the interrupt was accepted. The RTE
instruction accordingly returns to the next instruction after the instruction executed before the
exception-handling sequence.
4.9.2 PC Value Pushed on Stack for Address Error and Invalid Instruction Exceptions
The program counter value pushed on the stack for an address error or invalid instruction
exception differs depending on the conditions when the exception occurred.
4.10 Notes on Use of the Stack
If the stack pointer is set to an odd address, an address error will occur when the stack is accessed
during interrupt handling or for a subroutine call. The stack pointer should always point to an
even address. To keep the stack pointer pointing to an even address, a program should use word
data size when saving or restoring registers to and from the stack.
In the @–SP or @SP+ addressing mode, the CPU performs word access even if the instruction
specifies byte size. (This is not true in the @–Rn and @Rn+ addressing modes when Rn is a
register from R0 to R6.)
96

Related parts for HD6475328-CP10