Cpu Register Descriptions; General Registers; Stack Pointer - Hitachi H8/500 Series Hardware Manual

Table of Contents

Advertisement

3.2 CPU Register Descriptions

3.2.1 General Registers

All eight of the 16-bit general registers are functionally alike; there is no distinction between data
registers and address registers. When these registers are accessed as data registers, either byte or
word size can be selected.
R6 and R7, in addition to functioning as general registers, have special assignments.
R7 is the stack pointer, used implicitly in exception handling and subroutine calls. It can be
designated by the name SP, which is synonymous with R7. As indicated in figure 3-3, it points to
the top of the stack. It is also used implicitly by the LDM and STM instructions, which load and
store multiple registers from and to the stack and pre-decrement or post-increment R7 accordingly.
R6 functions as a frame pointer (FP). The LINK and UNLK use R6 implicitly to reserve or
release a stack frame.
Downloaded from
Elcodis.com
electronic components distributor
SP
Figure 3-3 Stack Pointer
Unused area
Stack area
34

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/532

Table of Contents