exception_handler.c
/*****************************************************************************
 * Reset code. By giving the code a section attribute with the name ".reset" *
 * we allow the linker program to locate this code at the proper reset vector*
 * address. This code jumps to _startup_ code for C program, _not_ main().   *
 *****************************************************************************/
Reset code. By giving the code a section attribute with the name ".reset"
we allow the linker program to locate this code at the proper reset vector
address. This code jumps to _startup_ code for C program, _not_ main().
Reset code . By giving the code a section attribute with the name " . reset " we allow the linker program to locate this code at the proper reset vector address . This code jumps to _startup_ code for C program _not_ main () .
void the_reset (void)
{
  asm (".set noat");         
  asm (".set nobreak");      
  asm ("movia r2, _start");  
  asm ("jmp r2");            
}
void the_reset ( void ) { asm ( " " ) ; asm ( " " ) ; asm ( " " ) ; asm ( " " ) ; }
Reset code.
Reset code .
/* the .set commands are included to prevent */ /* warning messages from the assembler */ /* jump to the C language _startup_ code */ /* (_not_ main, as in the original Altera file) */