I'm doing a loop to display numbers from 0 to 9. I can't figure how to write on the next line.
I'm doing this to try to understand asm, but I can't find any documentation I can understand.
section .text
global _start
_start:
mov ecx, 10
mov eax, '0'
l1:
mov [num], eax
mov eax, 4
mov ebx, 1
push rcx
mov ecx, num
mov edx, 1
int 0x80
mov eax, [num]
sub eax, '0'
inc eax
add eax, '0'
pop rcx
loop l1
mov eax,1
int 0x80
section .bss
num resb 1
The output is "0123456789" on one line, I'd like each number on a different line.