Re: Caaling assembly routine in c
- From: Hariprasad Govardhanam <harigov@xxxxxxxxx>
- Date: Fri, 29 Apr 2005 19:38:46 +0530
Sachin wrote:
Hi All,
I am working on MIPS architecture and I am compiling my project using GHS tool chain.
I want to call a assembly routine into c function. My code is like that:
.globl asm .ent asm
asm: ---- ---- .end asm
I am calling this routine in c function like that:
extern void asm(void);
void foo() { asm(); }
On compiling, error message comes that symbol asm unresolved.
Could any one tell that how I can do it for GHS.
Regards, Sachin
I think you are havind asm code in a separate file. You have to assemble asm code into an object file. And then compile C code to an object file. After you have both object files, link them and this creates an executable.
(I assume that your asm code handles all the code calling conventions, that standard C specifies OR your compiler requires) .
- References:
- Caaling assembly routine in c
- From: Sachin
- Caaling assembly routine in c
- Prev by Date: Re: main(int argc, char *argv[])
- Next by Date: Re: how to use static function defined in one file in another file is that impposiible in 'c '
- Previous by thread: Re: Caaling assembly routine in c
- Next by thread: two dimensional arrays:
- Index(es):
Relevant Pages
|