summaryrefslogtreecommitdiff
path: root/asm/code_80983D8.s
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-03-12 15:39:07 -0600
committerGitHub <noreply@github.com>2021-03-12 15:39:07 -0600
commit7b142311a7294c4c7a943870fa5f24f0fbea604a (patch)
treea1a9513c2f997cc8274af093803dd7d936e65ad0 /asm/code_80983D8.s
parentd72e17b5f5d795bebda2f6dc78dccb5e80c432b5 (diff)
Miscellaneous Work (Again) (#30)
* work on debug menu and document that and main menu * split, decomp, label more funcs * split exclusive pokemon data out into C * macro-ize exlusive pokemon data * decomp 2 more funcs * decomp a few more * finally match PromptNewQuestion * woot 7% aka more debug menu stuff
Diffstat (limited to 'asm/code_80983D8.s')
-rw-r--r--asm/code_80983D8.s63
1 files changed, 63 insertions, 0 deletions
diff --git a/asm/code_80983D8.s b/asm/code_80983D8.s
new file mode 100644
index 0000000..bb55c2d
--- /dev/null
+++ b/asm/code_80983D8.s
@@ -0,0 +1,63 @@
+ .include "constants/gba_constants.inc"
+ .include "asm/macros.inc"
+
+ .syntax unified
+
+ .text
+
+ thumb_func_start sub_80983D8
+sub_80983D8:
+ push {r4,lr}
+ movs r2, 0
+ ldrsh r3, [r1, r2]
+ movs r4, 0
+ ldrsh r2, [r0, r4]
+ subs r2, r3, r2
+ movs r3, 0x2
+ ldrsh r1, [r1, r3]
+ movs r4, 0x2
+ ldrsh r0, [r0, r4]
+ subs r1, r0
+ cmp r2, 0
+ bne _080983FA
+ cmp r1, 0
+ bne _080983FA
+ movs r0, 0
+ b _08098428
+_080983FA:
+ cmp r2, 0
+ ble _08098400
+ movs r2, 0x1
+_08098400:
+ cmp r1, 0
+ ble _08098406
+ movs r1, 0x1
+_08098406:
+ movs r0, 0x1
+ negs r0, r0
+ cmp r2, r0
+ bgt _08098410
+ adds r2, r0, 0
+_08098410:
+ cmp r1, r0
+ bgt _08098416
+ adds r1, r0, 0
+_08098416:
+ ldr r3, _08098430
+ adds r2, 0x1
+ adds r1, 0x1
+ lsls r0, r1, 1
+ adds r0, r1
+ adds r0, r2
+ lsls r0, 2
+ adds r0, r3
+ ldr r0, [r0]
+_08098428:
+ pop {r4}
+ pop {r1}
+ bx r1
+ .align 2, 0
+_08098430: .4byte gUnknown_8115E94
+ thumb_func_end sub_80983D8
+
+ .align 2,0