LibAsm/lib/strcpy.S
2025-01-24 18:55:26 +00:00

24 lines
340 B
ArmAsm

.intel_syntax noprefix
.globl _start
.text
# String-copying routine.
# Commented-out lines would also return the starting address of the destination address.
strcpy:
# push rsi
.loop:
movb r10b, [rdi]
cmpb r10b, 0
je .end
movb [rsi], r10b
inc rdi
inc rsi
jmp .loop
.end:
# pop rax
ret