Ron Stone wrote: > I've been reviewing section 29 (instruction set) of this manual > (DS31029A)) and have found a couple of examples that I don't understand. > Perhaps they're errors, but probably not. On pg. 29-29 (MOVF) Example 1: > > MOVF INDF, 0 > > Before Instruction > W= 0x17 > FSR=0xC2 > Contents of Address (FSR) = 0x00 > After Instruction > W = 0x17 > FSR= 0xC2 > Contents of Address (FSR)= 0x00 > Z=1 > > Is this correct? No; the result in the manual would be correct after a "MOVWF INDF" instruction. After the "MOVF INDF,0" instruction, the results should be: W = 0x00 FSR = 0xC2 (unchanged) Contents of Address (FSR) = 0x00 (unchanged) Z = 1 > What would happen if the instruction had been: MOVF INDF, 1 ? W = 0x17 (unchanged) FSR = 0xC2 (unchanged) Contents of Address (FSR) = 0x00 (unchanged) Z = 1 > On pg. 29-36 (RLF) and similarly for 29-37 (RRF) we have Example 2 > > RLF INDF,1 > Before Instruction > W= xxxx xxxx > FSR= 0xC2 > Contents of Address (FSR) = 0011 1010 > C=1 > After Instruction > W= 0x17 > FSR= 0xC2 > Contents of Address (FSR) = 0111 0101 > C=0 This is also wrong; after the RLF, the results are: W = uuuu uuuu (unchanged) FSR = 0xC2 (unchanged) Contents of Address (FSR) = 0111 0101 C = 0 -Andy === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 (personal) === http://www.netcom.com/~fastfwd (business)