On Mon, 22 Jul 1996, NEIL GANDLER wrote: > 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. > > Neil Gandler Neil, Because the SWAPF instruction does not affect the Z bit in the STATUS register. If you save STATUS using MOVF STATUS,temp_STATUS, you end up affecting the Z bit in the process. They swap it back in the restore part so no information is lost. Sherif