Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .686P
- .MODEL FLAT, STDCALL
- .STACK 4096
- .DATA
- MB_OK EQU 1
- str_format DB "X = %d", 0
- str_buffer DB 256 dup (0)
- m_title DB "LR_2", 0
- A db 4; a=4
- B db 2; b=2
- C1 db 3; c=3
- D db -71; d=-71
- X dd ?
- extern MessageBoxA@16:NEAR
- extern wsprintfA:NEAR
- .CODE
- START:
- movsx eax, A
- mov ebx, eax
- imul eax, eax ;eax = a^2
- imul ebx, eax ;ebx = a^3
- movsx ecx, C1
- imul ebx, ecx ;ebx = a^3*c
- imul ecx, ecx
- imul ecx, ecx ;ecx = c^4
- movsx edx, B
- imul edx, edx ;edx = b^2
- add eax, edx ;eax = a^2+b^2
- movsx edx, D
- add ecx, edx ;ecx = c^4+d
- cdq ;расширяем eax в edx:eax перед делением
- idiv ecx ;eax = (a^2+b^2)/(c^4+d)
- add eax, ebx ;eax = a^3*c + (a^2+b^2)/(c^4+d)
- sub eax, 190 ;eax = a^3*c + (a^2+b^2)/(c^4+d) - 190
- push eax
- PUSH OFFSET str_format
- PUSH OFFSET str_buffer
- CALL wsprintfA
- ADD esp, 12
- PUSH MB_OK
- PUSH OFFSET m_title
- PUSH OFFSET str_buffer
- PUSH 0
- CALL MessageBoxA@16
- RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement