Skip to content

Instantly share code, notes, and snippets.

@ancientstraits
Created May 12, 2022 12:42
Show Gist options
  • Save ancientstraits/8bf93acaaff8a3f5df911af890696ecc to your computer and use it in GitHub Desktop.
Save ancientstraits/8bf93acaaff8a3f5df911af890696ecc to your computer and use it in GitHub Desktop.
print all arguments in x64 asm
global main
extern puts
main:
push rbp
mov rbx, rdi
.loop:
push rsi
mov rdi, [rsi]
call puts
pop rsi
add rsi, 8
sub rbx, 1
cmp rbx, 0
je .end
jmp .loop
.end:
mov rax, 0
pop rbp
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment