beautypg.com

Iret – Zilog Z8F0130 User Manual

Page 168

background image

eZ8

CPU Core

User Manual

UM012820-0810

IRET Instruction

153

IRET

Definition

Interrupt Return.

Syntax

IRET

Operation

FLAGS

 @SP

SP

 SP + 1

PC

 @SP

SP

 SP + 2

IRQCTL[7]

 1

Description

This instruction is issued at the end of an interrupt service routine. Execu-
tion of IRET restores the Flags Register and the Program Counter. The
Interrupt Controller is enabled by setting Bit 7 of the Interrupt Control
Register to 1.

Flags

C

Restored to original setting before the interrupt occurred

Z

Restored to original setting before the interrupt occurred

S

Restored to original setting before the interrupt occurred

V

Restored to original setting before the interrupt occurred

D

Restored to original setting before the interrupt occurred

H

Restored to original setting before the interrupt occurred