ST10 FAMILY PROGRAMMING MANUAL
120/172
TRAP
Software Trap
Syntax
TRAP
op1
Operation
(SP)
<-- (SP) - 2
((SP)) <--
(PSW)
IF (SYSCON.SGTDIS=0) THEN
(SP)
<-- (SP) - 2
((SP)) <--
(CSP)
(CSP) <--
0
END IF
(SP)
<-- (SP) - 2
((SP)) <--
(IP)
(IP)
<-- zero_extend (op1*4)
Description
Invokes a trap or interrupt routine based on the specified operand, op1. The invoked routine is deter-
mined by branching to the specified vector table entry point. This routine has no indication of whether it
was called by software or hardware. System state is preserved identically to hardware interrupt entry
except that the CPU priority level is not affected. The RETI, return from interrupt, instruction is used to
resume execution after the trap or interrupt routine has completed. The CSP is pushed if segmentation is
enabled. This is indicated by the SGTDIS bit in the SYSCON register.
Flags
Addressing Modes
E
Z
V
C
N
-
-
-
-
-
E
Not affected.
Z
Not affected.
V
Not affected.
C
Not affected.
N
Not affected.
Mnemonic
Format
Bytes
TRAP
#trap7
9B t:ttt0
2
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...