Infineon Technologies C166S V2 User Manual page 311

16-bit microcontroller
Table of Contents

Advertisement

TRAP
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
(SP) ← (SP) - 2
((SP) ← (PSW)
IF (CPUCON1.SGTDIS = 0) THEN
END IF
(CSP) ← (VSEG)
(SP) ← (SP) - 2
((SP)) ← (IP)
(IP) ← ((op1) * 4) <<CPUCON1.SCINT
Description
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 completion of the trap or interrupt routine. The CSP is pushed if the segmentation is
enabled. This is indicated by the SGTDIS bit of the CPUCON1 register.
CPU Flags
E
Not affected.
Z
Not affected.
V
Not affected.
C
Not affected.
N
Not affected.
User Manual
Software Trap
Call Instructions
TRAP op1
op1 → 7-bit trap number
none
(SP) ← (SP) - 2
((SP)) ← (CSP)
E
Z
-
-
Detailed Instruction Description
V
C
-
-
8-311
User Manual
C166S V2
TRAP
N
-
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents