>=20 > Unless you're doing bootloading, you generally don't need to worry about > the instruction set of the chip. I've done bootloaders for the PIC18, > PIC24H, and PIC32, so I've had to deal with writing to flash, boot > sections of flash, and the C initialization code for the bootloader. On > the PIC18, I did the bootloader in assembly. On others, it's been in C > along with some assembly to set up for C execution (setting up stack > pointer and other registers that C requires be initialized). The startup > code generated by the compiler is used to initialize stuff for the > application. Since this changes as the application changes, this is moved > into the application area of flash. I have done bootloaders (based on Microchips AN1157 and AN1388) for PIC24 a= nd PIC32 and never touched the instruction set. The starup code for the application is separate from the bootloader startup code. The bootloader startup code is called on reset and the bootloader jumps to the application startup code when starting the application.=20 >=20 > Also when dealing with bootloaders, you have to mess with the linker > script to place code into the proper sections of flash. I find linker > scripts extremely cryptic. I've managed to modify them to do what I want, > but every time I go back to look at it, I have to relearn everything. Yes, linker scripts is a must to know when dealing with bootloaders. /Ruben --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .