Working SERV cpu
This commit is contained in:
23
sw/blinky/start.s
Normal file
23
sw/blinky/start.s
Normal file
@@ -0,0 +1,23 @@
|
||||
.section .text.init
|
||||
.globl _start
|
||||
.type _start, @function
|
||||
|
||||
_start:
|
||||
la sp, __stack_top
|
||||
|
||||
# Zero .bss
|
||||
la t0, __bss_start
|
||||
la t1, __bss_end
|
||||
1:
|
||||
bgeu t0, t1, 2f
|
||||
sw zero, 0(t0)
|
||||
addi t0, t0, 4
|
||||
j 1b
|
||||
|
||||
2:
|
||||
call main
|
||||
|
||||
3:
|
||||
j 3b
|
||||
|
||||
.size _start, .-_start
|
||||
Reference in New Issue
Block a user