sm64coopdx/asm/entry.s

33 lines
850 B
ArmAsm
Raw Normal View History

2019-08-25 06:46:40 +02:00
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64
.include "macros.inc"
.section .text, "ax"
2020-03-02 04:42:52 +01:00
glabel entry_point
2019-08-25 06:46:40 +02:00
lui $t0, %hi(_mainSegmentNoloadStart) # $t0, 0x8034
2019-11-03 20:36:27 +01:00
lui $t1, %lo(_mainSegmentNoloadSizeHi) # lui $t1, 2
2019-08-25 06:46:40 +02:00
addiu $t0, %lo(_mainSegmentNoloadStart) # addiu $t0, $t0, -0x6df0
2019-11-03 20:36:27 +01:00
ori $t1, %lo(_mainSegmentNoloadSizeLo) # ori $t1, $t1, 0xcee0
2019-08-25 06:46:40 +02:00
.L80246010:
addi $t1, $t1, -8
sw $zero, ($t0)
sw $zero, 4($t0)
bnez $t1, .L80246010
addi $t0, $t0, 8
2020-03-02 04:42:52 +01:00
lui $t2, %hi(main_func) # $t2, 0x8024
2019-08-25 06:46:40 +02:00
lui $sp, %hi(gIdleThreadStack) # $sp, 0x8020
2020-03-02 04:42:52 +01:00
addiu $t2, %lo(main_func) # addiu $t2, $t2, 0x6dc4
2019-08-25 06:46:40 +02:00
jr $t2
addiu $sp, %lo(gIdleThreadStack) # addiu $sp, $sp, 0xa00
nop
nop
nop
nop
nop
nop