Danny Decell wrote: > 1) Where does the file hos.inc actually reside? I must be blind because > I couldn't find it in the extracted files and folders provided when I > downloaded the whole package. I use a different naming convention for files so that the build system can automatically identify them. All regular PIC assembler source file names end in .aspic. The file you are looking for is called HOS.INS.ASPIC and is in the SOURCE/PICS directory. All the ASPIC files are translated to the native MPASM files by the preprocessor. > 2) When I do find hos.inc is that where the actual hard coded values for > w_save and status_save are when you take your interrupt? No, these are local variables in HOS_INTR.ASPIC. They are only used during interrupts, so there is no need to make them visible outside the interrupt module. That's one of the nice things about using the linker and having multiple source modules. The addresses of W_SAVE and STATUS_SAVE are not hard coded. The source code defines the linker section they must be allocated from, but the linker decides the exact address. There is no reason the source code needs them to be at a particular address within their sections (that's why the sections are defined as they are). > I am > interested in seeing where you save these values and how you guard > context when the data bank is somewhere other than bank zero at the > time of an interrupt. The code is in HOS_INTR.ASPIC. W is saved into global (unbanked RAM) so that the bank settings at the time of the interrupt don't matter. STATUS is saved into bank 0, but the value is written to STATUS_SAVE only after a CLRF STATUS is done to ensure bank 0 is set. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com _______________________________________________ http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist