To Print decimal 5
section .text
global _start
_start:
mov edx, 1
mov ecx, 5
add ecx, 48
mov ebx, 1
mov eax, 4
int 80h
ret
Commands I'm using for compiling on linux
nasm -f elf32 main.asm
ld -m elf_i386 -s -o main main.o
Error [1] 565 segmentation fault (core dumped) ./main