Download Print this page

Siemens C16 Series Instruction Set Manual page 113

16-bit cmos single-chip microcontrollers

Advertisement

TRAP
Syntax
Operation
Description
Condition Flags
Addressing Modes
Semiconductor Group
30Mar98@15:00h
Software Trap
TRAP
op1
(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)
Invokes a trap or interrupt routine based on the specified operand, op1.
The invoked routine is determined 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.
E
Z
-
-
E Not affected.
Z Not affected.
V Not affected.
C Not affected.
N Not affected.
Mnemonic
TRAP
#trap7
C166 Family Instruction Set
V
C
N
-
-
-
Format
9B t:ttt0
113
Instruction Description
TRAP
Version 1.2, 12.97
Bytes
2

Hide quick links:

Advertisement

loading