Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - section .data
 - fmt: db "%d", 0
 - one: dd 1
 - zero: dd 0
 - section .bss
 - x: resd 1
 - section .text
 - extern _scanf
 - extern _printf
 - global _lab1
 - global _lab2
 - global _lab3
 - global _main
 - _main:
 - push x
 - push fmt
 - call _scanf
 - add esp, 8
 - mov eax, [x]
 - cmp eax, [zero]
 - jg _lab1
 - mov eax, [zero]
 - jmp _lab2
 - _lab1: mov eax, [one]
 - _lab2: mov [x], eax
 - push dword [x]
 - push fmt
 - call _printf
 - add esp, 8
 - xor eax, eax
 - xor ecx, ecx
 - ret
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment