Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- segment .data
- align 4
- x:
- dd 10
- segment .text
- align 4
- f:
- push ebp
- mov ebp, esp
- sub esp, 4
- ;; before body
- push dword 1
- pop eax
- cmp eax, byte 0
- je near _L3
- push dword 3
- lea eax, [ebp+-4]
- push eax
- pop ecx
- pop eax
- mov [ecx], eax
- lea eax, [ebp+-4]
- push eax
- pop eax
- push dword [eax]
- call printi
- add esp, 4
- _L3:
- _L1:
- ;; after body
- _L2:
- leave
- ret
- segment .text
- align 4
- global _main:function
- _main:
- push ebp
- mov ebp, esp
- sub esp, 4
- push dword 0
- lea eax, [ebp+-4]
- push eax
- pop ecx
- pop eax
- mov [ecx], eax
- ;; before body
- push dword 1
- pop eax
- cmp eax, byte 0
- je near _L6
- call f
- add esp, 0
- push dword $x
- pop eax
- push dword [eax]
- call printi
- add esp, 4
- _L6:
- _L4:
- ;; after body
- _L5:
- lea eax, [ebp+-4]
- push eax
- pop eax
- push dword [eax]
- pop eax
- leave
- ret
- extern printi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement