format binary use32 org $1000000 jmp __global_0 ; DECL i -> integer, 1 ; param x, offset: -8, size: 4 ; PROC proc __global_proc: push ebp push esp pop ebp ; DECL l -> integer, 0 ; local l, offset: 4, size: 4 mov eax, 4 sub esp, eax push ebp pop ebx mov eax, 4 sub ebx, eax mov eax, 0 mov [ebx], eax ; LET l <- x push ebp pop ebx mov eax, -8 sub ebx, eax mov eax, [ebx] push eax push ebp pop ebx mov eax, 4 sub ebx, eax pop eax mov [ebx], eax ; LET i <- l push ebp pop ebx mov eax, 4 sub ebx, eax mov eax, [ebx] push eax pop eax mov [i], eax mov eax, 4 add esp, eax pop ebp ret 4 __global_0: ; CALL __global_proc( 42 ) mov eax, 42 push eax call __global_proc hlt i: dd $00000001