trap
Trap (Pseudo)
trap
Unconditional trap. Forces an exception. (Encoded as tw 31, 0, 0).
Details
Trap. Extended mnemonic for TW (tw 31,0,0). Unconditionally traps, transferring control to the system trap handler.
Pseudocode Operation
Trap()
Programming Note
Generates a program exception (System Call or Trap type) when the trap condition is true. The condition codes in TO select which comparisons trigger the trap: bit 0 = LT, bit 1 = GT, bit 2 = EQ, bit 3 = LU (unsigned), bit 4 = GU (unsigned). TO=31 (all bits set) always traps.
Example
trap
Encoding
Binary Layout
3
0
11111
6
00000
11
00000
16
4
21
/
31