section .data
output: db 48
acapo: db 0xA
section .text
global _start
_start:
; stampa numero
mov eax, 4
mov ebx, 0
mov ecx, output
mov edx, 1
int 0x80
; stampa spazio
mov eax, 4
mov ebx, 0
mov ecx, acapo
mov edx, 1
int 0x80
; incrementa contatore
mov al, [output]
inc al
mov [output], al
; controllo
mov al, [output]
cmp al, 58
jne _start
; fine programma
mov eax, 1
mov ebx, 0
int 0x80