diff options
author | Gogume1er <gogume1er@gmail.com> | 2021-06-05 12:06:24 +0200 |
---|---|---|
committer | Gogume1er <gogume1er@gmail.com> | 2021-06-05 12:06:24 +0200 |
commit | e242303ff5f56ef258bef9ea7608b6db28889096 (patch) | |
tree | b3e2d485e4428aac6294e03b26365d36c91d4528 /arm9/asm/MSL_string_extras.s | |
parent | 2288e6d101397143b08ff64a38baaeedd7f2c3dd (diff) | |
parent | 33a7ec1fd719b9321357aa59460cbdb9f7779053 (diff) |
Merge branch 'master' into unkk_020851B8
# Conflicts:
# arm9/asm/unk_020851B8.s
Diffstat (limited to 'arm9/asm/MSL_string_extras.s')
-rw-r--r-- | arm9/asm/MSL_string_extras.s | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arm9/asm/MSL_string_extras.s b/arm9/asm/MSL_string_extras.s new file mode 100644 index 00000000..c3b09fe9 --- /dev/null +++ b/arm9/asm/MSL_string_extras.s @@ -0,0 +1,46 @@ + .include "asm/macros.inc" + .include "global.inc" + + .text + + arm_func_start stricmp +stricmp: ; 0x020E9AD0 + stmdb sp!, {r3,lr} + ldr r3, _020E9B34 ; =__lower_mapC +_020E9AD8: + ldrb r2, [r0], #0x1 + cmp r2, #0x0 + blt _020E9AF0 + cmp r2, #0x80 + bge _020E9AF0 + ldrb r2, [r3, r2] +_020E9AF0: + ldrb lr, [r1], #0x1 + and r12, r2, #0xff + cmp lr, #0x0 + blt _020E9B0C + cmp lr, #0x80 + bge _020E9B0C + ldrb lr, [r3, lr] +_020E9B0C: + and r2, lr, #0xff + cmp r12, r2 + mvncc r0, #0x0 + ldmccia sp!, {r3,pc} + movhi r0, #0x1 + ldmhiia sp!, {r3,pc} + cmp r12, #0x0 + bne _020E9AD8 + mov r0, #0x0 + ldmia sp!, {r3,pc} + .balign 4 +_020E9B34: .word __lower_mapC + arm_func_end stricmp + + arm_func_start strnicmp +strnicmp: ; 0x020E9B38 + ldr ip, _020E9B40 ; =stricmp + bx r12 + .balign 4 +_020E9B40: .word stricmp + arm_func_end strnicmp |