Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Call C function in assembly (PIC 18)

Status
Not open for further replies.

atomlcp

Newbie level 4
Joined
Mar 19, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
assembler call function

I am beginner of programming PIC 18 UC using C. Please tell me how to call a C function in my ASM file and how to link them up?

Anything I need to specify when I invoke the C function in the ASM file?
 

call c function assembly

That call has to be compiler specific if there is no accepted calling convensions for all compilers .

What you have to do is to consult your compiler manual for c calling conventions .
 

You'd better avoid calling C function in ASM file, if need, only call the C function without input parameters, cause the input parameters are stored in registers or memory depending on the compiler. To call C function, it's usually call _func for func() routine, maybe you also should declare the function name in the asm file, depend on your specific compiler.
 

What is your compiler?
 

Use the librarian to make library of your functions, then you can call them.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top