Created
August 26, 2022 15:45
-
-
Save ljmccarthy/ecce06f1a9095b970bb4a4806766a22f to your computer and use it in GitHub Desktop.
Flat Assembler Hello World (Linux x86-64)
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
format ELF64 executable 3 | |
segment readable executable | |
entry $ | |
mov eax, 1 ; sys_write | |
mov edi, 1 ; fd = STDOUT_FILENO | |
mov rsi, message ; buf | |
mov rdx, message.end - message ; count | |
syscall | |
mov eax, 60 ; sys_exit | |
xor rdi, rdi ; status = 0 | |
syscall | |
message: db "hello, world", 10 | |
.end: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment