URL
https://opencores.org/ocsvn/sardmips/sardmips/trunk
Subversion Repositories sardmips
[/] [sardmips/] [trunk/] [PROGRAMMING_exception/] [crt0.S] - Rev 20
Go to most recent revision | Compare with Previous | Blame | View Log
/** Starting point for everything (bootstrap)** Initializes the stack pointer and jumps to main().*/#include "regdef.h".text.align 2.globl _start.ent _start_start:.set noreorderj reset_handlernopj handling_exceptionnopreset_handler:/* Setup stack pointer */la sp, _sp/* Clear bss */la t0, 0x00000000 /* First address */la t1, _end /* Last address */mfc0 k0, $12add k0, k0, 3mtc0 k0, $12jal mainnopj loopnophandling_exception:nopmfc0 k0, $13mfc0 k1, $14srl k0, k0, 2andi k0, k0, 0x1Fbeq k0, $0, handling_interruptnopadd $11, $0, $0addiu $11, k1, 4mtc0 $11, $14eretnophandling_interrupt:noperetnop/* Run endless loop when the program terminates */loop:j loop.set reorder.end _start
Go to most recent revision | Compare with Previous | Blame | View Log
