At 08:15 AM 2/21/04 +0000, you wrote:
>What I am really trying to do is to setup vectored IRQs.
>
>I am using assembly interrupt wrappers for ISRs in C. I want to write the
>function for setting up the VIC in C. Hence I need to know the starting
>address of my assembly wrappers in C. If I write the setup code for the VIC
>in assembly, then there is no problem as I can use the lables.
You want to do something like this ?
void Startup( void)
{
SetupVICentry( InterruptRoutine, InterruptEntry);
}
Where InterruptRoutine is your wrapper. And SetupVICentry uses the
routine's address to do whatever setup it needs?
Just declare your wrapper InterruptRoutine as global in the assembly with
.global.
By far the easiest way to to figure out the C to asm interface is to 1)
read the calling standard (it's on ARM's website) and 2) generate asm from
sample C to walk through how that works in actual practice.
gas has the option of using the C preprocessor I believe.
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, IIIMessage
RE: [lpc2000] Re: Mixing assembly and C...
2004-02-21 by Robert Adsett
Attachments
- No local attachments were found for this message.