Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hello, World! program written in NASM assembly for x86 (32 bit)
; Simple NASM syntax assembly program for x86 (32 bit).
; Use commands below to assemble, link and run ($ is the prompt):
; $ nasm -f elf32 hello.asm
; $ gcc -m32 -o hello hello.o
; $ ./hello
; Hello, world!
extern printf
section .text
global main
push ebp
mov ebp, esp
push msg
call printf
add esp, 4
section .data
msg db 'Hello, world!', 13, 10, 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment