INT

Software interrupt

INT

INTerrupt


[Syntax]

INT src

 

[Operation]

tmp0 = PSW;

U = 0;

I = 0;

PM = 0;

tmp1 = PC + 3;

PC = *(IntBase + src * 4);

SP = SP - 4;

*SP = tmp0;

SP = SP - 4;

*SP = tmp1;

 

[Function]

-

This instruction generates the unconditional trap which corresponds to the number specified as src.

-

The INT instruction number (src) is in the range 0 ? src ? 255.

-

This instruction causes a transition to supervisor mode, and clears the PM bit in the PSW to 0.

-

This instruction clears the U and I bits in the PSW to 0.

 

[Instruction Format]

Syntax

src

Code size

(Byte)

INT src

#IMM:8

3

[Flag Change]

-

This instruction does not affect the states of flags.

-

The state of the PSW before execution of this instruction is preserved on the stack.

 

[Description Example]

INT #0