Reti – NEC 78K/0 Series User Manual

Page 99

Advertising
background image

CHAPTER 5 EXPLANATION OF INSTRUCTIONS

99

User's Manual U12326EJ4V0UM

Return from Interrupt

RETI

Return from Hardware Vectored Interrupt

[Instruction format]

RETI

[Operation]

PC

L

← (SP),

PC

H

← (SP+1),

PSW

← (SP+2),

SP

← SP+3,

NMIS

← 0

[Operand]

None

[Flag]

Z

AC

CY

R

R

R

[Description]

•

This is a return instruction from the vectored interrupt.

•

The data saved to the stack returns to the PC and the PSW, and the program returns from the interrupt service

routine.

•

This instruction cannot be used for return from the software interrupt with the BRK instruction.

•

None of interrupts are acknowledged between this instruction and the next instruction to be executed.

•

The NMIS flag is set to 1 by acknowledgment of a non-maskable interrupt, and cleared to 0 by the RETI

instruction.

[Caution]

When the return from non-maskable interrupt servicing is performed by an instruction other than the RETI

instruction, the NMIS flag is not cleared to 0, and therefore no interrupts (including non-maskable interrupts)

except software interrupts can be acknowledged.

Advertising