Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
toodles said:
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?
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top