Harold Hallikainen wrote: > >What I want to do is compare the value in rmax (value increasing each > >interrupt) with a fixed value in r1, read in at the beginning of the > >program from some BCD switches. > > > How about just setting the destination of the XOR to w instead of > file? this destroys w, but leaves your memory fine. > > > movf rmax,w ; load w with max time count > > xorwf r1,0 ; Set Z if equal, destroys W, maintains r1 > > btfsc _z ; has the max time been reached This will not destroy W because easy to do the same XORWF again and restore W ;) WBR Dmitry. PS. movfw A addwf B,w xorwf C,w skpnz ... ;probably GOTO or CALL command xorwf C,w ;restore A+B in W ...