Module Stack Frame - Motorola MC68020 User Manual

Table of Contents

Advertisement

All module descriptor types $10–$1F are reserved for user definition and cause a format
error exception. This provides the user with a means of disabling any module by setting a
single bit in its descriptor without loss of any descriptor information.
If the called module does not wish the module data area pointer to be loaded into a
register, the module entry word can select register A7, and the loaded value will be
overwritten with the correction stack pointer value after the module stack frame is created
and filled.

9.7.2 Module Stack Frame

Figure 9-12 illustrates the format of the module stack frame. This frame is constructed by
the CALLM instruction and is removed by the RTM instruction. The first and second long
words contain control information passed by the CALLM instruction to the RTM instruction.
The module descriptor pointer contains the address of the descriptor used during the
module call. All other locations contain information to be restored on return to the calling
module.
The PC is the saved address of the instruction following the CALLM instruction. The opt
and type fields, which specify the argument options and type of module stack frame, are
copied to the frame from the module descriptor by the CALLM instruction; the RTM
instruction will cause a format error if the opt and type fields do not have recognizable
values. The access level is the saved access control information, which is saved from
external hardware by the CALLM instruction and restored by the RTM instruction. The
argument count field is set by the CALLM instruction and is used by the RTM instruction to
remove arguments from the stack of the calling module. The contents of the CCR are
saved by the CALLM instruction and restored by the RTM instruction. The saved stack
pointer field contains the value of the stack pointer when the CALLM instruction started
execution, and that value is restored by RTM. The saved module data area pointer field
contains the saved value of the module data area pointer register from the calling module.
SP
+$08
+$0C
+$10
+$18
MOTOROLA
15
13
12
OPT
TYPE
0
0
0
0
0
0
0
0
0
0
0
0
MODULE DESCRIPTION POINTER
SAVED PROGRAM COUNTER
SAVED MODULE DATA AREA POINTER
ARGUMENTS (OPTIONAL)
Figure 9-12. Module Call Stack Frame
M68020 USER'S MANUAL
8
7
SAVED ACCESS LEVEL
0
0
CONDITION CODES
0
0
ARGUMENT COUNT
(RESERVED)
0
9- 17

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68ec020

Table of Contents