pmd-red/asm/code_808411C.s
mid-kid 99a038284b Translate all .include to #include
This decision was made to reduce the complexity of using .include whilst
juggling with tools/scaninc and tools/preproc:
- tools/scaninc doesn't apply the proper search rules for .include (it
  assumes #include behavior). In particular, it doesn't consider paths
  starting from $PWD, and doesn't scan the included files as a result.
- .include had to be processed before #include by preproc in many cases,
  as code was being included that had to be preprocessed by CPP (think
  of #define). This contradicts standard GCC behavior.

To make include paths consistent across the asm/ data/ and src/
directories, the following files were moved:
- constants/ → include/asm/constants/
- asm/macros/ → include/asm/macros/
- asm/macros.inc → include/asm/macros.inc
- include/macros/m4a.inc → include/asm/macros/m4a.inc

As part of the necessary changes for this to work, the scaninc method in
the makefile was improved to generate .d files that don't choke when
files are missing.
2021-12-20 16:29:12 +01:00

31 lines
458 B
ArmAsm

#include "asm/constants/gba_constants.inc"
#include "asm/macros.inc"
.syntax unified
.text
thumb_func_start sub_808411C
sub_808411C:
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
cmp r5, r4
beq _0808413C
cmp r5, r4
blt _08084134
subs r0, r5, r4
bl DungeonRandomCapped
adds r0, r4
b _0808413C
_08084134:
subs r0, r4, r5
bl DungeonRandomCapped
adds r0, r5
_0808413C:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_808411C
.align 2, 0