summaryrefslogtreecommitdiff
path: root/asm/memory.s
diff options
context:
space:
mode:
Diffstat (limited to 'asm/memory.s')
-rw-r--r--asm/memory.s183
1 files changed, 0 insertions, 183 deletions
diff --git a/asm/memory.s b/asm/memory.s
index e364f1b..f6a0a38 100644
--- a/asm/memory.s
+++ b/asm/memory.s
@@ -5,189 +5,6 @@
.text
- thumb_func_start InitHeap
-InitHeap:
- push {lr}
- bl InitHeapInternal
- pop {r0}
- bx r0
- thumb_func_end InitHeap
-
- thumb_func_start MemoryClear8
-MemoryClear8:
- push {lr}
- cmp r1, 0
- ble _08002EAA
- movs r2, 0
-_08002EA0:
- subs r1, 0x1
- strb r2, [r0]
- adds r0, 0x1
- cmp r1, 0
- bgt _08002EA0
-_08002EAA:
- pop {r0}
- bx r0
- thumb_func_end MemoryClear8
-
- thumb_func_start MemoryClear16
-MemoryClear16:
- push {lr}
- cmp r1, 0
- ble _08002EC2
- movs r2, 0
-_08002EB8:
- subs r1, 0x2
- strh r2, [r0]
- adds r0, 0x2
- cmp r1, 0
- bgt _08002EB8
-_08002EC2:
- pop {r0}
- bx r0
- thumb_func_end MemoryClear16
-
- thumb_func_start MemoryClear32
-MemoryClear32:
- push {lr}
- bl CpuClear
- pop {r0}
- bx r0
- thumb_func_end MemoryClear32
-
- thumb_func_start MemoryFill8
-MemoryFill8:
- push {lr}
- lsls r1, 24
- lsrs r1, 24
- cmp r2, 0
- ble _08002EE8
-_08002EDE:
- subs r2, 0x1
- strb r1, [r0]
- adds r0, 0x1
- cmp r2, 0
- bgt _08002EDE
-_08002EE8:
- pop {r0}
- bx r0
- thumb_func_end MemoryFill8
-
- thumb_func_start MemoryFill16
-MemoryFill16:
- push {lr}
- lsls r1, 16
- lsrs r1, 16
- cmp r2, 0
- ble _08002F00
-_08002EF6:
- subs r2, 0x2
- strh r1, [r0]
- adds r0, 0x2
- cmp r2, 0
- bgt _08002EF6
-_08002F00:
- pop {r0}
- bx r0
- thumb_func_end MemoryFill16
-
- thumb_func_start MemoryFill32
-MemoryFill32:
- push {lr}
- cmp r2, 0
- ble _08002F12
-_08002F0A:
- subs r2, 0x4
- stm r0!, {r1}
- cmp r2, 0
- bgt _08002F0A
-_08002F12:
- pop {r0}
- bx r0
- thumb_func_end MemoryFill32
-
- thumb_func_start MemoryCopy8
-MemoryCopy8:
- push {lr}
- adds r3, r0, 0
- cmp r2, 0
- ble _08002F2E
-_08002F20:
- subs r2, 0x1
- ldrb r0, [r1]
- strb r0, [r3]
- adds r1, 0x1
- adds r3, 0x1
- cmp r2, 0
- bgt _08002F20
-_08002F2E:
- pop {r0}
- bx r0
- thumb_func_end MemoryCopy8
-
- thumb_func_start MemoryCopy16
-MemoryCopy16:
- push {lr}
- adds r3, r0, 0
- cmp r2, 0
- ble _08002F4A
-_08002F3C:
- subs r2, 0x2
- ldrh r0, [r1]
- strh r0, [r3]
- adds r1, 0x2
- adds r3, 0x2
- cmp r2, 0
- bgt _08002F3C
-_08002F4A:
- pop {r0}
- bx r0
- thumb_func_end MemoryCopy16
-
- thumb_func_start MemoryCopy32
-MemoryCopy32:
- push {lr}
- adds r3, r0, 0
- cmp r2, 0
- ble _08002F62
-_08002F58:
- subs r2, 0x4
- ldm r1!, {r0}
- stm r3!, {r0}
- cmp r2, 0
- bgt _08002F58
-_08002F62:
- pop {r0}
- bx r0
- thumb_func_end MemoryCopy32
-
- thumb_func_start InitHeapInternal
-InitHeapInternal:
- push {lr}
- sub sp, 0x8
- ldr r0, _08002F90
- str r0, [sp]
- movs r0, 0x90
- lsls r0, 10
- str r0, [sp, 0x4]
- ldr r1, _08002F94
- movs r0, 0
- str r0, [r1]
- ldr r0, _08002F98
- ldr r2, _08002F9C
- mov r1, sp
- movs r3, 0x20
- bl DoInitHeap
- add sp, 0x8
- pop {r0}
- bx r0
- .align 2, 0
-_08002F90: .4byte gUnknown_20011D0
-_08002F94: .4byte gUnknown_2000EA8
-_08002F98: .4byte gUnknown_2000EB0
-_08002F9C: .4byte gUnknown_2000ED0
- thumb_func_end InitHeapInternal
-
thumb_func_start DoInitHeap
DoInitHeap:
push {r4-r6,lr}