In ASM, the command MOVF TEMP,W moves the value stored in the TEMP register into the W register. Does the value in theTEMP register remain unchanged or is it deleted?
What about MOVWF TEMP? Does moving the value in the W register into the TEMP register remove the value from the W register or leave it unchanged?
While there are a lots of explanations for these commands, I can't find one that actually states what happens.
In the datasheet of the chip you are using there is the Instruction Set Summary, in there is the full description of MOVWF and it gives a clear example of the state of those registers before and after execution.
Also if you use MPLABs SIM and a watch window you can single step though your code and see exactly what happens to your data in W and TEMP.
Attachments
2013-01-28 12_16_59-billyboy - MPLAB IDE v8.80 - Watch.jpg
Thank you both. Just wasn't clear from the datasheet:
MOVWF Move W to f
Syntax: [ label ] MOVWF f
Operands: 0 ≤ f ≤ 127
Operation: (W) → (f)
Status Affected: None
Description: Move data from W register to register ‘f’. which doesn't answer my question.