EC000 Core Processor
4-2
MC68307 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 implementa-
tions. In the user programmer's model, the EC000 core offers 16, 32-bit, general-purpose
registers (D7–D0, A7–A0), a 32-bit program counter, and an 8-bit condition code register.
The first eight registers (D7–D0) are used as data registers for byte (8-bit), word (16-bit), and
long-word (32-bit) operations. The second set of seven registers (A6–A0) and the user stack
pointer (USP) can be used as software stack pointers and base address registers. In addi-
tion, the address registers can be used for word and long-word operations. All of the 16 reg-
isters can be used as index registers. The supervisor programmer's model consists of
supplementary registers used in the supervisor mode.
The status register, illustrated in
Figure 4-2, contains the interrupt mask (eight levels avail-
able) and the following condition codes: overflow (V), zero (Z), negative (N), carry (C), and
extend (X). Additional status bits indicate that the processor is in the trace (T) mode and/or
in the supervisor (S) state.
Figure 4-1. Programming Model
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