
MOTOROLA
4-12
INSTRUCTION SET
CPU32
REFERENCE MANUAL
4.3.10 Condition Tests
Conditional program control instructions and the TRAPcc instruction execute on the
basis of condition tests. A condition test is the evaluation of a logical expression relat-
ed to the state of the CCR bits. If the result is one, the condition is true. If the result is
zero, the condition is false. For example, the T condition is always true, and the EQ
condition is true only if the Z bit condition code is true.
Table 4-10
lists each condition
test.
RESET
RTE
none
none
none
none
Assert RESET line
(SP)
→
SR; SP + 2
→
SP; (SP)
→
PC;
SP + 4
→
SP;
restore stack according to format
Data
→
SR; STOP
Data
→
SR; interrupt mask
→
EBI; STOP
Trap Generating
none
If breakpoint cycle acknowledged, then execute
returned operation word, else trap as illegal
instruction.
none
If background mode enabled, then enter
background mode, else format/vector offset
→
– (SSP);
PC
→
(SSP); SR
→
(SSP); (vector)
→
PC
16, 32
If Dn < 0 or Dn < (ea), then CHK exception
8, 16, 32
If Rn < lower bound or Rn > upper bound, then CHK
exception
none
SSP – 2
→
SSP; vector offset
→
(SSP);
SSP – 4
→
SSP; PC
→
(SSP);
SSP – 2
→
SSP; SR
→
(SSP);
Illegal instruction vector address
→
PC
none
SSP – 2
→
SSP; format/vector offset
→
(SSP);
SSP – 4
→
SSP; PC
→
(SSP); SR
→
(SSP);
vector address
→
PC
none
16, 32
none
If V set, then overflow TRAP exception
Condition Code Register
8
Data
CCR
→
CCR
8
Data
⊕
CCR
→
CCR
16
16
CCR
→
Destination
8
Data
+
CCR
→
CCR
STOP
LPSTOP
#
data
#
data
16
none
BKPT
#
data
BGND
none
CHK
CHK2
ea
, Dn
ea
, Rn
ILLEGAL
none
TRAP
#
data
TRAPcc
none
#
data
none
If cc true, then TRAP exception
TRAPV
ANDI
EORI
MOVE
#
data
,
CCR
#
data
,
CCR
ea
, CCR
CCR,
ea
#
data
,
CCR
Source
→
CCR
ORI
Table 4-10 Condition Tests
Mnemonic
T
F*
HI
LS
CC
CS
Condition
True
False
High
Low or Same
Carry Clear
Carry Set
Encoding
0000
0001
0010
0011
0100
0101
Test
1
0
C
Z
C
+
Z
C
C
Table 4-9 System Control Operations (Continued)
Instruction
Syntax
Size
Operation
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.