PDA

View Full Version : MOVF command



scopit
- 27th November 2009, 20:19
Hi there
This may be a dumb qestion but I am teaching myself and learning the hard way so please be kind to me!

If I use the MOVF to move the contents of a register in RAM to W....does the PIC clear the contents of the register?

Thanks
Scopit

Darrel Taylor
- 27th November 2009, 23:28
MOVF really should have been named COPYF.
Because it copies one register to another, leaving the original intact.

Similarly MOVWF leaves the value in W, and copies it to the register.

hth,

scopit
- 28th November 2009, 10:16
Thanks Darrel.
I know it was a pretty naive question but I am debugging some code and if the value was moved, it would have explained the problem!