summaryrefslogtreecommitdiff
path: root/asm/fatal_system.s
blob: 45009eeb88161deff61252447ec5197ae33eaaa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	.include "constants/gba_constants.inc"
	.include "asm/macros.inc"

	.syntax unified

	.text

        thumb_func_start FatalErrorPrintFuncFileLine
FatalErrorPrintFuncFileLine:
	push {lr}
	sub sp, 0x100
	adds r2, r0, 0
	cmp r2, 0
	beq _08011B5E
	mov r0, sp
	bl PrintFuncFileLine
	b _08011B66
_08011B5E:
	ldr r2, _08011B6C
	mov r0, sp
	bl PrintFuncFileLine
_08011B66:
	add sp, 0x100
	pop {r0}
	bx r0
	.align 2, 0
_08011B6C: .4byte gUnknown_80D421C
	thumb_func_end FatalErrorPrintFuncFileLine

	thumb_func_start FatalErrorFormatMessage
FatalErrorFormatMessage:
	push {r0-r3}
	push {lr}
	sub sp, 0x100
	ldr r1, [sp, 0x104]
	add r2, sp, 0x108
	mov r0, sp
	bl vsprintf
	add sp, 0x100
	pop {r3}
	add sp, 0x10
	bx r3
	thumb_func_end FatalErrorFormatMessage

	thumb_func_start sub_8011B88
sub_8011B88:
	push {r0-r3}
	push {lr}
	sub sp, 0x100
	ldr r1, [sp, 0x104]
	add r2, sp, 0x108
	mov r0, sp
	bl vsprintf
	add sp, 0x100
	pop {r3}
	add sp, 0x10
	bx r3
	thumb_func_end sub_8011B88

        .align 2,0