Created
June 19, 2019 02:55
-
-
Save mattheusv/ff262d60305d900785d65bf82113c2d3 to your computer and use it in GitHub Desktop.
Hello World with Assembly
This file contains 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
section .data | |
text db "Hello World",10 | |
section .text | |
global _start | |
_start: | |
mov rax, 1 | |
mov rdi, 1 | |
mov rsi, text | |
mov rdx, 14 | |
syscall | |
mov rax, 60 | |
mov rdi, 0 | |
syscall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requirements
Compile and Run
$ nasm -f elf64 -o hello.o hello.asm
$ ld hello.o -o hello
$ ./hello