M68K C Interrupt Handler

Holland, Alexander MHX HollaA@HPD.Abbott.com
Tue Jan 16 19:34:00 GMT 2001


Thanks to everyone who responded to this issue. I tried every function
attribute to generate an m68k C interrupt function or a function with no
prologue - "interrupt", "interrupt_handler", "naked", "get naked", etc. -
but none worked. 

However, I thought I would relate what did work. Basically,  I placed a
label after my interrupt function and made it global using inline assembly
and used this label in the vector table, e.g. 

asm(".globl IrqHandler");				
void DummyIrqHandler(void)					
{							
asm("IrqHandler:");	// Put IrqHandler in the vector table.
    CPU_SAVE_REGISTERS();		
     // Interrupt handler specific C code goes here.			
    CPU_RESTORE_REGISTERS();				
    asm("rte");

}	


Alex			


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list