diff options
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 |