Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Assembly call in C

2006-05-16 by vaneenbergen

--- In lpc2000@yahoogroups.com, "heedaf" <ruffellfamily@...> wrote:
>
> Could someone please send me a sample of how to call assembly code 
in 
> C with passing in a variable x and returning a variable y.  I have 
> some assembly code that I need to call in my C program but I'm not 
> sure how to do it.  Also, how do you store arrays in assembly.
> Thanks,
> Dewayne
>

in gcc (i use rowley) the first 4 arguments are in R0 - R3, the rest 
will be put on stack (so best keep everything withing 4 arguments). 
the return will be in R0.

joost

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.