Hi Andy, Does this mean that decfsz won't work on the various registers you mention below (because they can never be equal to zero)? And, when using the incfsz instruction on these registers, where do you put the result? If the bits are always set to "1" and you specify putting the result back there, what happens? Don't you hate it when you answer a question and more questions pop up? Myke >>Rogerio Odriozola Belden wrote: >> >>> Hi everyone, I've never used the INCFSZ instruction; does it roll >>> over to zero after 127 ? Or whats the top number before rolling to >>> zero? >> >>Rogerio: >> >>This question is trickier than it seems... >> >>For most registers (including all the General-Purpose Registers), the >>top number is 255. >> >>For the 16C54/55/56 FSR register, the answer is 31 (decimal), since the >>upper 3 bits of the FSR are always "1". >> >>For the 16C57 FSR register, the answer is 127, since the high bit is >>always set to "1". >> >>For the 16C5x's PORTA register, INCFSZ will increment the register >>from 0 to 15 (deciaml) before it wraps back around to 0, but the >>"skip" part of the INCFSZ instruction will NEVER happen, because the >>upper 4 bits of the PORTA register always read as "0". >> >>-Andy >> >>Andrew Warren - fastfwd@ix.netcom.com >>Fast Forward Engineering, Vista, California >>http://www.geocities.com/SiliconValley/2499 >> >> Myke "We're Starfleet officers, weird is part of the job." Capt. Catherine Janeway