Integrating PIC ASM as a callable function from C18

Status
Not open for further replies.

toodles

New Member
I have a large C18 project currently in place that requires a few functions to be tightly controlled in assembly language. Inline __asm isn't cutting it. Does anyone know of any documentation or existing projects have have a C18 calling a function from a MPASM compiled .asm file, as well as C18 functions being called from an assembly function?
 
Inline Assembly

Assembler code can be included in the C code, the block of assembly code starts with _asm and ends with _endasm:
_asm
[label:] [ [arg1[, arg2[, arg3]]]]
_endasm
 
Have you taken a look at the library source code that's included with C18? As I remember it, the memcpy routine is written in assembler using the C18 calling conventions... that might provide you the skeleton you need for your routine.

Regards,
Paul
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…