Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Author: Juan Escobar
- ; /usr/include/i386-linux-gnu/asm/unistd_32.h
- ; nasm -f elf -o HelloWorld.o HelloWorld.asm
- ; ld -o HelloWorld HelloWorld.asm
- global _start
- section .text
- _start:
- ; print "Hello World!" on the screen
- mov eax, 0x4 ; system call _write(fd, *buf, lenght)
- mov ebx, 0x1 ; file descriptor (standart output)
- mov ecx, message ; *buf
- mov edx, 0x0c ; lenght (12)
- int 0x80 ; interruptor
- ; exit the program
- mov eax, 0x1 ; system call _exit(status)
- mov ebx, 0x5 ; status (5)
- int 0x80 ; interruptor
- section .data
- ; label
- message: db "Hello World!" ; define byte
Add Comment
Please, Sign In to add comment