Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
EXAMPLE :
....
[label] RETFIE
Before instruction execution: PC = x
GIE (interrupt enable bit of the SATUS
register) = 0
After instruction: PC = TOS (top of stack)
GIE = 1
RETLW - Return with literal in W
Syntax: [label] RETLW k
Description: 8-bit literal k is loaded into register W. The value from the top of stack is
loaded to the program counter.
Operation: (k) -> W; top of stack (TOP) -> PC
Operand: -
Status affected: -
Number of cycles: 2
EXAMPLE :
....
[label] RETLW 0x43
Before instruction execution: W = x
PC = x
TOS (top of stack) = x
After instruction: W = 0x43
PC = TOS (top of stack)
TOS (top of stack) = TOS - 1
http://www.mikroe.com/en/books/picmcubook/ch9/ (25 of 35)5/3/2009 11:35:12 AM