Skip to content

Instantly share code, notes, and snippets.

@gandaro
Created March 3, 2012 16:48
Show Gist options
  • Save gandaro/1966941 to your computer and use it in GitHub Desktop.
Save gandaro/1966941 to your computer and use it in GitHub Desktop.
“Hello world” written using NASM assembly
section .data
hello: db "Hello world!",0xa
length: equ $-hello
section .text
global _start
_start:
mov eax, 4 ; write(1, hello, length)
mov ebx, 1
mov ecx, hello
mov edx, length
int 0x80
mov eax, 1 ; exit(0)
mov ebx, 0
int 0x80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment