At 10:22 AM 8/6/99 -0400, you wrote: >> Could anyone tell me how to make a program start at a specified address with >> the Hitech PICC compiler. >> Is there a way to telle the compiler to start at another adress than 0x000?? > >org (start address) Nope. Use a PSECT to define it. FWIW, if you read the manual and the FAQ's you'll find exactly how to do it. Been there. Works nicely. Andy OK, so I'll be nice. Here: Here's the compile instructions out of one of my projects. The second-to-last line is the key for this example. It forces the module to be located at 0x0ffd. // picc < sdd.mak // // where sdd.mak is: // // -16C76 -O -Zg1 \ // -Osdd -Msdd.map \ // -E -G \ // -L-Pidfuse=2000h \ // -L-Preserved=0ffdh \ // sdd.c Here's the code in the C file: // ///////////////////////////////////////////////////////////////////////// ///// // // Chip Serial Number, Config Fuses, etc. // ////////////////////////////////////////////////////////////////////////////// // // Author: Andy Kunz // Date: 10-18-98 // Modifications: none // extern byte SerialNumber[]; #asm psect reserved,class=CODE,delta=2 global _SerialNumber _SerialNumber: retlw 0xFF retlw 0xFF retlw 0xFF #endasm This is a trivial example, but it gets the job done. If you are looking at putting C code at a particular address, you need to force the module into the PSECT using a PRAGMA - go look in the manual for that one. It works, too. Andy ================================================================== Andy Kunz Life is what we do to prepare for Eternity ------------------------------------------------------------------ andy@rc-hydros.com http://www.rc-hydros.com - Race Boats andy@montanadesign.com http://www.montanadesign.com - Electronics ==================================================================