Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2021 01:10
What would you like to do?
.arch armv5t
.fpu softvfp
.syntax unified
.align 2
.global ReformString
.type ReformString, %function
push {r2, r3}
cmp r1, #0
cmpne r0, #0
push {r0, r1, r2, lr}
ldr ip, [sp, #16]
moveq r3, #1
movne r3, #0
moveq r0, #0
beq jmp1
add r2, sp, #20
str r2, [sp, #4]
cmp r3, ip
ldrne lr, [r2], #4
ldrbne lr, [r1, lr]
strbne lr, [r0, r3]
addne r3, r3, #1
bne jmp2
mov r2, #0
strb r2, [r0, r3]
add sp, sp, #12
pop {lr}
add sp, sp, #8
bx lr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment