Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: Q: Global variables with C and ASM / pass argument from ASM to C function ?

2005-04-15 by Robert Adsett

At 01:25 PM 4/15/05 +0000, ateichtmann wrote:
> > You could take the simple way out.  Write a quick function in C as a
> > template and compile it to asm to use as a template.
>
>I have no idea, how to create an asm template.
>These are the interesting and simple things that are never mentioned
>in a compiler documentation or book :-)

Most compilers have a simple switch to generate assembly as the output 
rather than an object file (something like cc -S).  That's all you 
need.  Then you can take the generated assembly file and use it as a 
template or as a tool to gather insight into the compilers operation.

The biggest use I've found for that is usually to clarify what the 
compiler's documentation has to say about the calling conventions.  Or how 
to call library internal routines, although if I have to go that far there 
is usually not much point to sticking with assembler.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

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.