> I just finished my first interrupt routine for a PIC 16c74 and looked at > p. 2-639 of the microntoller databook. They suggest a routine > to save the current value of the STATUS and W register before > procedding through the interrupt routine and restoring these values > upon completion of the routine. What I don't understand is why > they swap the nibbles of the status register. I would appreciate > any advice. It is probably not necessary to swap the nybbles of the status register (though it doesn't hurt anything; "movf XX,w" takes just as long as "swapf XX,w"). It is, however, necessary to swap the nybbles of the W register (and the status may have been swapped for consistency). If the W register wasn't swapped, an attempt to reload it using a "movf XX,w" would trash the status register. By contrast, "swapf XX,w" does not have this effect. By the way, there are a couple of other approaches that could be used for similar effect; I don't think anything would be any shorter than the "swapf" approach, though, even though that approach does have one "waste" instruction.