linux-mips-fnet
[Top] [All Lists]

Re: some help needed

To: Sandeep Kumar <Sandeep_Kumar@neomagic.com>
Subject: Re: some help needed
From: Jun Sun <jsun@mvista.com>
Date: Wed, 30 Aug 2000 20:15:05 -0700
Cc: linux-mips@fnet.fr
References: <4.3.2.7.2.20000830172254.00b02cb0@popserver>
Sender: jsun@hermes.mvista.com
Sandeep Kumar wrote:
> 
> can anyone tell me how to call C funtion from assembly, in detail pls.

Assuming your C function will return back to the assembly code, you can
simply use:

        jal     myCFunc

The first four integer arguments are passed through a0-a3, and the
integer return is put in v0.

For more complicated arguments and return values, I suggest you read the
book: MIPS RISC Architecture, by Gerry Kane and Joe Heinrich.

Jun

<Prev in Thread] Current Thread [Next in Thread>