On Mon, 2007-02-26 at 18:08 +0530, Anand Gadiyar wrote: > Hi all, > > I've been playing around with a PIC 16F877A now. I'm a newbie. I > seem to have found strange behavior while using the SWAPF instruction. > > Here's the code I tried in MPLAB SIM. > > MOVLW 0x4F > SWAPF W,0 W isn't an SFR, so you can't use SWAPF this way. You'll have to use an SFR. TTYL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist