Untitled
unknown
plain_text
a month ago
1.3 kB
2
Indexable
bits 32 global start extern exit, printf, scanf import exit msvcrt.dll import printf msvcrt.dll import scanf msvcrt.dll segment data use32 class=data _format db "Print: %d", 10, 0 _sformat db "%d", 0 a dd 0 b dd 0 c dd 0 result dd 0 segment code use32 class=code start: push dword a push dword _sformat call [scanf] add esp, 4 * 2 push dword b push dword _sformat call [scanf] add esp, 4 * 2 push dword c push dword _sformat call [scanf] add esp, 4 * 2 mov eax, 0 mov eax, dword [a] push eax mov eax, dword [b] mov ebx, eax pop eax imul eax, ebx push eax mov eax, dword [c] mov ebx, eax pop eax add eax, ebx push eax mov eax, 2 push eax mov eax, 1 mov ebx, eax pop eax add eax, ebx mov ebx, eax pop eax cdq idiv ebx mov dword [result], eax push dword [result] push dword _format call [printf] add esp, 4 * 2 mov eax, 0 mov eax, dword [a] push eax mov eax, dword [b] push eax mov eax, dword [c] mov ebx, eax pop eax add eax, ebx mov ebx, eax pop eax imul eax, ebx push eax mov eax, dword [b] push eax mov eax, dword [c] mov ebx, eax pop eax imul eax, ebx mov ebx, eax pop eax sub eax, ebx mov dword [result], eax push dword [result] push dword _format call [printf] add esp, 4 * 2
Editor is loading...
Leave a Comment