Return Literal to W
W is loaded with the eight-bit literal 'k'. The program counter (PC) is loaded from the top of the stack (TOS). The high address latch (PCLATH) remains unchanged.
[ label ] RETLW k
(k) → (W),
(TOS) → (PC)
- k is from 0 to 255
Status Affected: None
SUB1 ADDWF PCL RETLW 0x07 RETLW 0x08
If W is 1 before a call to SUB1, the value 7 is returned. If W is 2 before a call to SUB1, the value 8 is returned.