Skip to content

Instantly share code, notes, and snippets.

@timofurrer
Created April 21, 2012 10:07
Show Gist options
  • Save timofurrer/2436316 to your computer and use it in GitHub Desktop.
Save timofurrer/2436316 to your computer and use it in GitHub Desktop.
Minimal Assembly "Hello World"
.data
hello:
.string "Hallo, Welt!\n"
.text
.global _start
_start:
movl $4, %eax /* write() */
movl $1, %ebx /* 1 = stdout */
movl $hello, %ecx /* Adresse von hello */
movl $13, %edx /* Länge des Strings */
int $0x80 /* trap, Syscall absetzen */
movl $1, %eax /* _exit() */
movl $0, %ebx /* Status: 0 */
int $0x80
as -o asm.o asm.s; ld -o asm asm.o; strip asm;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment