Created
August 7, 2025 05:50
-
-
Save terremoth/34dafdea5b0d919c9d95c58089450a92 to your computer and use it in GitHub Desktop.
Hello World in assembly x64 using AT&T syntax
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
.section .data | |
msg: | |
.asciz "Hello, World!\n" | |
.section .text | |
.global main | |
main: | |
mov $1, %rax | |
mov $1, %rdi | |
lea msg(%rip), %rsi | |
mov $14, %rdx | |
syscall | |
mov $60, %rax | |
xor %rdi, %rdi | |
syscall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Windows x64 MinGW64 version:
Compile (same way) with: