Created
February 27, 2019 10:17
-
-
Save mariusvn/d48319d4f4c118cbfaba3d1c1a3d7c2d to your computer and use it in GitHub Desktop.
To compile this just use nasm -f elf64 helloworld.asm && gcc helloworld.o
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
BITS 64 | |
global main | |
SECTION .text | |
main: | |
push rbp | |
mov rbp, rsp | |
mov rax, 1 | |
mov rdi, 1 | |
mov rsi, message | |
mov rdx, 14 | |
syscall | |
leave | |
ret | |
SECTION .data | |
message: db "Hello World!", 10, 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍