4- 2
MC68306 USER'S MANUAL
MOTOROLA
4.3 PROGRAMMING MODEL
The EC000 core executes instructions in one of two modes—user mode or supervisor
mode. The user mode provides the execution environment for the majority of application
programs. The supervisor mode, which allows some additional instructions and privileges,
is used by the operating system and other system software.
To provide upward compatibility of code written for a specific implementation of the EC000
core, the user programmer's model, illustrated in Figure 4-1, is common to all
implementations. In the user programmer's model, the EC000 core offers 16, 32-bit,
general-purpose registers (D0–D7, A0–A7), a 32-bit program counter, and an 8-bit
condition code register. The first eight registers (D0–D7) are used as data registers for
byte (8-bit), word (16-bit), and long-word (32-bit) operations. The second set of seven
registers (A0–A6) and the user stack pointer (USP) can be used as software stack
pointers and base address registers. In addition, the address registers can be used for
word and long-word operations. All of the 16 registers can be used as index registers. The
supervisor programmer's model consists of supplementary registers used in the
supervisor mode.
SUPERVISOR PROGRAMMING MODEL
USER PROGRAMMING MODEL
CCR
PC
A7/USP
A6
A5
A4
A3
A2
A1
A0
D7
D6
D5
D4
D3
D2
D1
D0
31
0
31
0
SSP
SR
(CCR)
PROGRAM COUNTER
CONDITION CODE REGISTER
SUPERVISOR STACK POINTER
STATUS REGISTER (CCR IS ALSO SHOWN IN
THE USER PROGRAMMING MODEL)
USER STACK POINTER
DATA REGISTERS
ADDRESS REGISTERS
EC1
Figure 4-1. Programmer's Model