Skip to content

Instantly share code, notes, and snippets.

@yasaichi
Last active Aug 15, 2020
Embed
What would you like to do?
Hello World in Assembly
.intel_syntax noprefix
.global main
main:
mov rdx, 14 # message length
lea rsi, [rip + message]
mov rdi, 1 # file descriptor (stdout)
mov rax, 1 # system call number (sys_write)
syscall
jmp exit
exit:
mov rdi, 0
mov rax, 60
syscall
message:
.ascii "Hello, World!\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment