Skip to content

Instantly share code, notes, and snippets.

@Overv
Last active December 17, 2015 18:49
Show Gist options
  • Save Overv/5655904 to your computer and use it in GitHub Desktop.
Save Overv/5655904 to your computer and use it in GitHub Desktop.
Hello World
.text
message: .asciz "Hello, world!\n"
.global main
main:
# Initialize stack base pointer
movl %esp, %ebp
# Print message to console
pushl $message
call printf
addl $4, %esp
# Exit program with success exit code
movl $0, (%esp)
call exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment