Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %include "io.inc"
- CEXTERN printf
- CEXTERN scanf
- section .rodata
- get db "%u", 0
- set db "0x%08X", `\n`, 0
- section .text
- global CMAIN
- CMAIN:
- push ebp
- mov ebp, esp
- and esp, -16
- sub esp, 16
- .read:
- lea eax, [esp+12]
- mov dword[esp+4], eax
- mov dword[esp], get
- call scanf
- cmp eax, 1
- jnz .end
- mov eax, dword[esp+12]
- mov dword[esp+4], eax
- mov dword[esp], set
- call printf
- jmp .read
- .end:
- leave
- xor eax, eax
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement