> I've done one in 150 words and can probably be streamlined even further. I can believe that. There are a lot of possible features a bootloader can have. Which ones you chose has a large impact on size. I just checked, and one version of my bootloader for a 16F877 used 364 program memory locations and had the following features: 1 - The code at 0 - 3 and the bootloader itself is protected. It is not overwritten regardless of what the host sends. 2 - The bootloader is always run on reset. It checksums the application code (everything except itself) and runs the application only if the checksum matches the expected value. If it doesn't, the bootloader waits for a new upload. The purpose of this is to protect against a failed or interrupted upload. The expected checksum for an upload is transmitted by the host and stored in the bootloader. 3 - Even if the app checksum matches, the bootloader sends a message to the host and waits for a short timeout. This gives the host an opportunity perform a new upload before the old app code gets run. 4 - The bootloader uses the hardware UART. New firmware (except for the bootloader and the reset vector) can be uploaded into a 16F877 in about 37 seconds using 115.2Kbaud. 5 - The bootloader does not use interrupts, so does not treat the interrupt vector at 4 as special. 6 - This particular version that takes 364 bytes is also aware of some of the hardware environment. It must perform some initialization of external hardware. This is unique to this particular instance. 7 - The host communications protocol includes informing the host of the app checksums on startup, whether the app was run, invitation to upload from the bootloader, request to upload from the host, various acknoledgements, flow control, etc. Flow control is done at the protocol level because only a 3 wire RS-232 connection (RX, TX, GND) is used. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu