summaryrefslogtreecommitdiff
path: root/arm9/asm/MSL_Common_wchar_io.s
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-06-02 08:54:17 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-06-02 08:54:17 -0400
commit4180f497410f2c6a29fab435ff1cfa0e17d81f8a (patch)
tree907d1bb32d013b05988f7b6f6876c493386eeb79 /arm9/asm/MSL_Common_wchar_io.s
parente7929cb735b9c1dc783eef3eb6fbfc7e6f666835 (diff)
Split libc.s, 5
Diffstat (limited to 'arm9/asm/MSL_Common_wchar_io.s')
-rw-r--r--arm9/asm/MSL_Common_wchar_io.s43
1 files changed, 43 insertions, 0 deletions
diff --git a/arm9/asm/MSL_Common_wchar_io.s b/arm9/asm/MSL_Common_wchar_io.s
new file mode 100644
index 00000000..bc161879
--- /dev/null
+++ b/arm9/asm/MSL_Common_wchar_io.s
@@ -0,0 +1,43 @@
+ .include "asm/macros.inc"
+ .include "global.inc"
+
+ .text
+
+ arm_func_start fwide
+fwide:
+ cmp r0, #0x0
+ beq _020E500C
+ ldr r3, [r0, #0x4]
+ mov r2, r3, lsl #0x16
+ movs r2, r2, lsr #0x1d
+ bne _020E5014
+_020E500C:
+ mov r0, #0x0
+ bx lr
+_020E5014:
+ mov r2, r3, lsl #0x14
+ movs r2, r2, lsr #0x1e
+ beq _020E5034
+ cmp r2, #0x1
+ beq _020E505C
+ cmp r2, #0x2
+ moveq r1, #0x1
+ b _020E5060
+_020E5034:
+ cmp r1, #0x0
+ ble _020E504C
+ bic r2, r3, #0xc00
+ orr r2, r2, #0x800
+ str r2, [r0, #0x4]
+ b _020E5060
+_020E504C:
+ biclt r2, r3, #0xc00
+ orrlt r2, r2, #0x400
+ strlt r2, [r0, #0x4]
+ b _020E5060
+_020E505C:
+ mvn r1, #0x0
+_020E5060:
+ mov r0, r1
+ bx lr
+ arm_func_end fwide