>You have a ISR that checks the status bits and jumps out to >the handler code for each device. To add a new device you >have to add new code into the ISR to check the appropriate >status bits for the new device. My technique has no similar >code. The handlers for devices are just linked into one >segment and just run one after another. The main ISR is a >stub that saves the context and then jumps to the start of >the chained handlers. How do you get the linker to chain the handlers? The only way I can see is to hard code it into the modules. How do you set the interrupt priority? Essentially it is done by deciding the order in which the flags get tested, in your case this means setting the order of chained code. I suspect that the example I gave would actually reach the lowest priority in a shorter time, as it could potentially stop bank switching code being required at the bit testing stage, for the jump to the next test, which may become an advantage on a chip with some timing critical apps. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist