/l/linux-x86.nasm
http://github.com/AdamHarte/hello-world · Unknown · 18 lines · 15 code · 3 blank · 0 comment · 0 complexity · 44a96f6963b4b28b66a48f83082a6ca6 MD5 · raw file
- # nasm linux-x86.nasm -o linux-x86.o -f elf && ld linux-x86.o -m elf_i386 -o linux-x86
- section .data
- msg db "Hello World", 0xa
- len equ $ - msg
- section .text
- global _start
- _start:
- mov eax, 4
- mov ebx, 1
- mov ecx, msg
- mov edx, len
- int 0x80
-
- mov eax, 1
- mov ebx, 0
- int 0x80