.section .data
msg: .ascii "Hallo\n"
counter: .byte
amount: .long

.section .text
.global _start
_start:
	movl $3, %eax
	movl $0, %ebx
	movl $amount, %ecx
	movl $2, %edx
	int $0x80

	movb $0x30, (counter)

_loop:
	xor %eax, %eax
	movb (counter), %bh
	cmpb (amount), %bh
	je _exit

	movl $4, %eax
	movl $1, %ebx
	movl $msg, %ecx
	movl $7, %edx
	int $0x80

	movb (counter), %ah
	inc %ah
	movb %ah, (counter)

	jmp _loop

_exit:
	movl $1, %eax
	movl $0, %ebx
	int $0x80