On Sat, Mar 28, 2009 at 1:50 PM, Olin Lathrop wrote: > > I have not tried what would happen if you jump into a middle > > of double word instruction. > > You can't. There is no such thing as a odd execution addres since the low > bit of the PC is not implemented, or you can think of it as being hard > wired > to 0. I see. What I was wonderin, however, if you have a 4 byte instruction, like GOTO or CALL, or MOVFF in a jump table, and you are addressing to the middle would cause any problems. Lets say the jump table starts at 0x200 so the first GOTO is at 0x200, then 0x204, 0x208 etc and you jump into 0x203. As you said ths 0. bit is always zero so it jumps into 0x202 which is still in the middle of goto, but that one is implemented as NOP, so no big surprise happens during the execusion: 41: start 0580 0E00 MOVLW 0 42: movlw upper(jmptbl) 0582 6EFB MOVWF 0xffb, ACCESS 43: movwf PCLATU 0584 0E02 MOVLW 0x2 44: movlw high(jmptbl) 0586 6EFA MOVWF 0xffa, ACCESS 45: movwf PCLATH 0588 0E03 MOVLW 0x3 46: movlw jmptbl+3 058A 6EF9 MOVWF 0xff9, ACCESS 47: movwf PCL 48: 49: jmptbl code 0x200 50: jmptbl 0200 EFC0 GOTO 0x580 51: goto start 0202 F002 NOP 0204 ECC0 CALL 0x580, 0 52: call start 0206 F002 NOP 0208 C020 MOVFF 0x20, 0xf80 53: movff 0x20, PORTA 020A FF80 NOP I am always suprprise how well PICs are designed. The only small modification I would have do is to causing a reset when 0xFxxx NOP is executed so such kind of software errors could have been determined faster. Tamas -- http://www.mcuhobby.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist