Zilog Z16F2810 Manual de usuario Pagina 126

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 216
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 125
IRET Instruction UM018809-0611
110
ZNEO
®
CPU Core
User Manual
IRET
Definition
Interrupt Return
Syntax
IRET
Operation
Normal IRET Chained IRET
PC (SP) PC Pending Interrupt Vector
SP
SP + 4 FLAGS[0] 0
FLAGS[7:0]
+1(SP)
SP
SP + 2
Description
This instruction is issued at the end of an interrupt service routine. It performs one of the follow-
ing two operations:
If no interrupts are pending or the Chained Interrupt Enable flag (CIRQE) is 0, execu-
tion of IRET restores the Program Counter and the Flags register from the stack.
If one or more vectored interrupts are pending and the CIRQE flag is 1, executing the
IRET instruction passes execution directly to the highest-priority pending interrupt
service routine. The contents of the stack are not changed.
For details about chained interrupts, see the Returning From a Vectored Interrupt
section on
page 44.
Any Push or other instructions in the service routine that decrement the stack pointer
must be followed by matching Pop or increment instructions to ensure the Stack Pointer
is at the correct location when IRET is executed. Otherwise, the wrong address loads into
the Program Counter and the program cannot operate properly.
Flags
If IRET executes normally, it restores the Flags register to its state prior to the first interrupt in
the chain.
Caution:
Vista de pagina 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 215 216

Comentarios a estos manuales

Sin comentarios