Last active
August 15, 2020 12:06
-
-
Save yasaichi/3a57959491546500db969e644d428d07 to your computer and use it in GitHub Desktop.
Hello World in Assembly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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