Download Print this page

Siemens SAB 80515 Series User Manual page 193

8-bit single-chip microcontroller family

Advertisement

RETI
Function:
Return from interrupt
Description:
RETI pops the high and low-order bytes of the PC successively from the stack, and
restores the interrupt logic to accept additional interrupts at the same priority level
as the one just processed. The stack pointer is left decremented by two. No other
registers are affected; the PSW is not automatically restored to its pre-interrupt
status. Program execution continues at the resulting address, which is generally the
instruction immediately after the point at which the interrupt request was detected.
If a lower or same-level interrupt is pending when the RETI instruction is executed,
that one instruction will be executed before the pending interrupt is processed.
Example:
The stack pointer originally contains the value 0B H . An interrupt was detected
during the instruction ending at location 0122 H . Internal RAM locations 0A H and
0B H contain the values 23 H and 01 H , respectively. The instruction
RETI
will leave the stack pointer equal to 09 H and return program execution to location
0123 H .
Operation:
RETI
(PC15-8) ← ((SP))
(SP) ← (SP) – 1
(PC7-0) ← ((SP))
(SP) ← (SP) – 1
Encoding:
0 0 1 1
Bytes:
1
Cycles:
2
Semiconductor Group
0 0 1 0
193
*
Instruction Set

Advertisement

loading

This manual is also suitable for:

Sab 80c515Sab 80c535Sab 80535Sab 80515k