> > No, that's so you can jump from the reset vector before the code hits the > > interrupt vector. You need at least 3 instructions for this, two to set > > PCLATH properly, and one GOTO. I use the 4th instruction to make sure > > interrupts are off so that a GOTO 0 (with PCLATH set appropriately of > > course) performs a software reset. > > I know I'm probably having a complete blonde moment here, but it is my > understanding that when at the reset vector, we know that PCLATH has to be = > 0, and the initialisation routine can always be placed within the first page > in program space. Hence, we can get by with a single GOTO at the reset > vector address, which branches to somewhere within the first page. True, but I like to let the linker put my startup module wherever it feels like. There is little point in economizing instructions after a restart, and it would be hard to put the remaining locations before address 4 to a useful purpose anyway. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.