mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-27 23:10:50 +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.
77 lines
1.1 KiB
ArmAsm
77 lines
1.1 KiB
ArmAsm
#include "asm/constants/gba_constants.inc"
|
|
#include "asm/macros.inc"
|
|
|
|
.syntax unified
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_807167C
|
|
sub_807167C:
|
|
push {lr}
|
|
ldr r2, [r0, 0x70]
|
|
ldr r1, [r1, 0x70]
|
|
adds r0, r2, 0
|
|
adds r0, 0xA4
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x1
|
|
beq _080716D2
|
|
adds r0, r2, 0
|
|
adds r0, 0x40
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x4A
|
|
beq _0807169A
|
|
cmp r0, 0x47
|
|
bne _0807169E
|
|
_0807169A:
|
|
movs r0, 0x1
|
|
b _080716A0
|
|
_0807169E:
|
|
movs r0, 0
|
|
_080716A0:
|
|
cmp r0, 0
|
|
bne _080716D2
|
|
ldrb r0, [r2, 0x8]
|
|
cmp r0, 0
|
|
bne _080716D2
|
|
adds r0, r1, 0
|
|
adds r0, 0xA4
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x1
|
|
beq _080716D2
|
|
adds r0, r1, 0
|
|
adds r0, 0x40
|
|
ldrb r0, [r0]
|
|
cmp r0, 0x4A
|
|
beq _080716C2
|
|
cmp r0, 0x47
|
|
bne _080716C6
|
|
_080716C2:
|
|
movs r0, 0x1
|
|
b _080716C8
|
|
_080716C6:
|
|
movs r0, 0
|
|
_080716C8:
|
|
cmp r0, 0
|
|
bne _080716D2
|
|
ldrb r0, [r1, 0x8]
|
|
cmp r0, 0
|
|
beq _080716D6
|
|
_080716D2:
|
|
movs r0, 0x2
|
|
b _080716E4
|
|
_080716D6:
|
|
ldrb r0, [r2, 0x6]
|
|
ldrb r1, [r1, 0x6]
|
|
cmp r0, r1
|
|
bne _080716E2
|
|
movs r0, 0
|
|
b _080716E4
|
|
_080716E2:
|
|
movs r0, 0x1
|
|
_080716E4:
|
|
pop {r1}
|
|
bx r1
|
|
thumb_func_end sub_807167C
|
|
|
|
.align 2, 0
|