Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@310 cc03376c-175c-47c8-b038-4cd826a8556b
46 lines
573 B
ArmAsm
46 lines
573 B
ArmAsm
.file "init.S"
|
|
|
|
.text
|
|
.align 2
|
|
.globl _init
|
|
.extern end
|
|
|
|
_init:
|
|
.set noreorder
|
|
|
|
# set uart
|
|
la $8, sys_uart_baud
|
|
addiu $9, $0, baudrate
|
|
sb $9, 0($8)
|
|
|
|
# set stack pointer
|
|
la $sp, stack_ptr
|
|
la $gp, _gp
|
|
|
|
# zero bss
|
|
la $8, __bss_start
|
|
la $9, end
|
|
$zeroise:
|
|
sw $0, 0($8)
|
|
bne $8, $9, $zeroise
|
|
addiu $8, 4
|
|
|
|
# zero sbss
|
|
# la $8, __sbss_start
|
|
# la $9, __sbss_end
|
|
#$szeroise:
|
|
# sw $0, 0($8)
|
|
# bne $8, $9, $szeroise
|
|
# addiu $8, 4
|
|
|
|
# jump main
|
|
la $8, main
|
|
jalr $8
|
|
|
|
_terminate:
|
|
nop
|
|
j _terminate
|
|
nop
|
|
|
|
.set reorder
|