I wrote: >Andy: > >Opps. I should have said a test case of 0x00FFxx where xx is anything >but 00. Using 0x00FF01 and your outline: > > ;HI MD LO > ; > ;00 FF 01 > DECF HI ;FF FF 01 > DECF MID ;FF FE 01 > DECF LO ;FF FE 00 > > INCFSZ LO,W ;FF FE 00 W = 01 > INCF MID ;FF FF FF MID = 0xFF, so far so good. > > INCFSZ MID,W ;FF FF FF W = 00, thinks overflow occured. > INCF HI ;01 FF FF result off by 0x010000 now. > >Chip I messed up the last few lines, I seem to be a bit tired today: INCFSZ LO,W ; FF FE 00 W = 01 INCF MID ; FF FF 00 (I mess-up last byte.) INCFSZ MID,W ; FF FF 00 W = 00, so thinks overflow occurred. INCF HI ; FF FF 00 This instruction is skipped. The results are off by 0x010000, but in the other direction. Sorry about any confusion. Chip.