zera
public text v1 · immutable%include "asm_io.inc"
section .data
msg db "eax hat den wert: ",0
section .data
global asm_main
asm_main:
enter 0,0
pusha
mov eax, 0
mov ecx, 10
; the next loop would look in C like:
; for(i = 0; i < 10; i++)
; printf("eax hat den wert: %d\n", i+1);
myloop:
mov ebx, eax
mov eax, msg
call print_string
mov eax, ebx
add eax, 1
call print_int
sub eax, 1
call print_nl
add eax, 1
loop myloop
mov eax, 0
mov ebx, 0
mov ecx, 0
popa
leave
ret