HTMLify
hello-world.asm
Views: 812 | Author: demo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | section .data hello db 'Hello, World!',0 section .text global _start _start: ; Write the string to stdout (file descriptor 1) mov eax, 4 ; syscall number for sys_write mov ebx, 1 ; file descriptor 1 (stdout) mov ecx, hello ; pointer to the string mov edx, 13 ; length of the string int 0x80 ; interrupt to invoke syscall ; Exit the program (exit code 0) mov eax, 1 ; syscall number for sys_exit mov ebx, 0 ; exit code 0 int 0x80 ; interrupt to invoke syscall |