125. Initiate processor TRAP

125.1. Name

TRAP -- Initiate processor trap

125.2. Synopsis

        TRAP        #<number>

125.3. Function

Processor starts an exception process. TRAP number is pointed out by 4 bits into the instruction. 16 vectors are free to be used for TRAP (vectors from 32 to 47). So the <number> can go from 0 to 15. PC and SR are stored to SSP, and Vector is written to PC.

125.4. Format

        -----------------------------------------------------------------
        |15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        |---|---|---|---|---|---|---|---|---|---|---|---|---------------|
        | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |  No of TRAP   |
        -----------------------------------------------------------------

125.5. Result

        None.

125.6. See also

TRAPcc