Phillip wrote: > Said another way do you mean write it in a different project make a > precompiled library and link to it? No, just a different module. You can link MPASM and C18 modules together in the same project. > Can you show me a two or three line example of how to write a function > directly in asm and to call it from my C routine?....assuming it is > doable from my C compiler. Since you can do anything you want in MPASM, of course you can use it to create a subroutine that is callable from C18. There is really nothing special to do if the subroutine doesn't take arguments or return a function result. C18 passes arguments on the data stack, and uses FSR1 as the stack pointer. There is no need for me to go into the details here since they are described in the manual. What part of the description in particular are you asking about? ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist