#include .equ REG_BASE, 0x1f80 .equ REG_GP0, 0x1810 .equ REG_GP1, 0x1814 .set noreorder .section .startup .extern main .extern _stacktop .extern _gp .extern _bss_start .extern _bss_end .globl _start _start: la sp, _stacktop la gp, _gp la t0, _bss_start la t1, _bss_end nop beq t0, t1, donebss nop zerobss: sw zero, (t0) addi t0, t0, 4 nop bne t0, t1, zerobss nop donebss: jal main nop 0: b 0b nop # vi:ts=8 sts=8 sw=8 ft=mips: