BRK

Unconditional trap

BRK

BReaK


[Syntax]

BRK

 

[Operation]

tmp0 = PSW;

U = 0;

I = 0;

PM = 0;

tmp1 = PC + 1;

PC = *IntBase;

SP = SP - 4;

*SP = tmp0;

SP = SP - 4;

*SP = tmp1;

 

 

[Function]

-

This instruction generates an unconditional trap of number 0.

-

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

-

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

-

The address of the instruction next to the executed BRK instruction is saved.

 

[Instruction Format]

Syntax

Code size

(Byte)

BRK

1

[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]

BRK