LibAsm/lib/strcpy.S

18 lines
337 B
ArmAsm
Raw Normal View History

.intel_syntax noprefix
.text
2025-01-24 19:01:05 +00:00
# String-copying routine. Strings should be null-terminated.
# Input: rdi = source string base, rsi = destination string base
# No check is done for buffer overflow.
strcpy:
movb r10b, [rdi]
cmpb r10b, 0
je .end
movb [rsi], r10b
inc rdi
inc rsi
2025-01-24 19:01:05 +00:00
jmp strcpy
.end:
ret