RET
Operation: | RET |
Function: | Return From Subroutine |
Syntax: | RET |
Instructions | OpCode | Bytes | Cycles | Flags |
RET | 0x22 | 1 | 2 | None |
Description: RET is used to return from a subroutine previously called by LCALL or ACALL. Program execution continues at the address that is calculated by popping the topmost 2 bytes off the stack. The most-significant-byte is popped off the stack first, followed by the least-significant-byte.
RETI
Operation: | RETI |
Function: | Return From Interrupt |
Syntax: | RETI |
Instructions | OpCode | Bytes | Cycles | Flags |
RETI | 0x32 | 1 | 2 | None |
Description: RETI is used to return from an interrupt service routine. RETI first enables interrupts of equal and lower priorities to the interrupt that is terminating. Program execution continues at the address that is calculated by popping the topmost 2 bytes off the stack. The most-significant-byte is popped off the stack first, followed by the least-significant-byte.
RETI functions identically to RET if it is executed outside of an interrupt service routine.
User Comments
No Posts found !Login to Post a Comment.