Seeing as I have spent half a day chasing this bug, I thought I would share it with you all. If you write an interrupt handler on a 16C84, then you need to manually store the W register and STATUS register to ensure they main program doesn't go wrong. No problem so far. You also may need to store the FSR if used by the main program and interrupts, as in a FIFO handling situation... Easy... So at the start of the handler I store W and STATUS, and at the end I restore STATUS and W. I forgot that re-loading W would of course change the Z flag !!! So you must restore STATUS, then restore W, and then set or clear Z depending on the stored value of STATUS. What a mess... ARGGGGGGGGGGGGGGGGG! half a day wasted... You learn something new every day. -- _ (_) _| _ . _ _ Tel +44 973 222257 Nokia orange in stock *NOW*. E&OE ( )(_|( |(_|| ) Fax UK 0500 222258 http://www.eaglenet.co.uk/aa/ Moving to Bracknell? large family ? http://www.eaglenet.co.uk/aa/house/