Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEFAULT REL
- section .rodata
- string1 db "One for "
- len1 equ $ - string1
- string2 db ", one for me.", 0
- len2 equ $ - string2
- section .text
- global two_fer
- two_fer:
- mov rax, rdi
- mov rbx, rsi
- xor rdi, rdi
- lea rsi, [string1]
- lea rdi, [rbx]
- mov rcx, len1
- rep movsb
- xor dl, dl
- xor rcx, rcx
- _label:
- cmp byte [rax], 0
- je _exit
- add rcx, 1
- jmp _label
- _exit:
- mov rcx, rax
- lea rsi, [rax]
- lea rdi, [rbx + len1]
- rep movsb
- lea rsi, [string2]
- lea rdi, [rbx + len1 + rax]
- mov rcx, len2
- rep movsb
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement