mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-27 15:00:33 +00:00
99a038284b
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.
57 lines
785 B
ArmAsm
57 lines
785 B
ArmAsm
#include "asm/constants/gba_constants.inc"
|
|
#include "asm/macros.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
|
|
thumb_func_start sub_80869E4
|
|
sub_80869E4:
|
|
push {r4-r7,lr}
|
|
mov r7, r9
|
|
mov r6, r8
|
|
push {r6,r7}
|
|
adds r7, r0, 0
|
|
mov r9, r1
|
|
lsls r2, 24
|
|
lsrs r2, 24
|
|
mov r8, r2
|
|
lsls r3, 24
|
|
asrs r6, r3, 24
|
|
ldr r0, [r7, 0x70]
|
|
adds r0, 0x46
|
|
movs r4, 0
|
|
ldrsb r4, [r0, r4]
|
|
cmp r4, r6
|
|
beq _08086A30
|
|
adds r5, r0, 0
|
|
_08086A08:
|
|
adds r0, r4, 0
|
|
adds r1, r6, 0
|
|
mov r2, r8
|
|
bl sub_8002A70
|
|
lsls r0, 24
|
|
asrs r4, r0, 24
|
|
movs r0, 0x7
|
|
ands r0, r4
|
|
strb r0, [r5]
|
|
ldrb r1, [r5]
|
|
adds r0, r7, 0
|
|
bl sub_806CE68
|
|
mov r0, r9
|
|
movs r1, 0x46
|
|
bl sub_803E708
|
|
cmp r4, r6
|
|
bne _08086A08
|
|
_08086A30:
|
|
pop {r3,r4}
|
|
mov r8, r3
|
|
mov r9, r4
|
|
pop {r4-r7}
|
|
pop {r0}
|
|
bx r0
|
|
thumb_func_end sub_80869E4
|
|
|
|
.align 2,0
|