Created
April 16, 2021 01:10
-
-
Save astroza/892db7db85078e067caf569974547508 to your computer and use it in GitHub Desktop.
ReformString
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.arch armv5t | |
.fpu softvfp | |
.text | |
.syntax unified | |
.align 2 | |
.global ReformString | |
.type ReformString, %function | |
ReformString: | |
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] | |
jmp2: | |
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] | |
jmp1: | |
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