1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 17:54:15 +00:00
oot/asm/entry.s
Tharo 982e7be1f7
Preliminary fixes for boot/libultra (#1032)
* Preliminary fixes

* Missed a NULL
2021-11-28 07:50:35 -05:00

37 lines
800 B
ArmAsm

.include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .text
.set BOOT_STACK_SIZE, 0x400
glabel entrypoint # 0x80000400
lui $t0, %hi(_bootSegmentBssStart)
addiu $t0, %lo(_bootSegmentBssStart)
li $t1, %lo(_bootSegmentBssSize)
.L8000040C:
addi $t1, $t1, -8
sw $zero, ($t0)
sw $zero, 4($t0)
bnez $t1, .L8000040C
addi $t0, $t0, 8
lui $t2, %hi(bootproc)
lui $sp, %hi(sBootThreadStack + BOOT_STACK_SIZE)
addiu $t2, %lo(bootproc)
jr $t2
addiu $sp, %lo(sBootThreadStack + BOOT_STACK_SIZE)
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop