NEC 78K/0 Series User Manual

Page 97

Advertising
background image

CHAPTER 5 EXPLANATION OF INSTRUCTIONS

97

User's Manual U12326EJ4V0UM

Break

BRK

Software Vectored Interrupt

[Instruction format]

BRK

[Operation]

(SP–1)

PSW,

(SP–2)

(PC+1)

H

,

(SP–3)

(PC+1)

L

,

IE

0,

SP

SP–3,

PC

H

(3FH),

PC

L

(3EH)

[Operand]

None

[Flag]

Z

AC

CY

[Description]

This is a software interrupt instruction.

PSW and the next instruction address (PC+1) are saved to the stack. After that, the IE flag is cleared (0)

and the saved data is branched to the address indicated with the word data at the vector address (003EH).

Because the IE flag is cleared (0), the subsequent maskable vectored interrupts are disabled.

The RETB instruction is used to return from the software vectored interrupt generated with this instruction.

Advertising