Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Z = -X * (1 - X * Y)
- format PE Console
- entry start
- include 'win32a.inc'
- section '.const' data readable
- x dd 2
- y dd 2
- section '.data' data readable writeable
- z dd 0
- stringFormat db "Result: %d", 0
- section '.code' code readable executable
- start:
- mov eax, [x]
- imul eax, [y]
- mov [z], eax
- mov eax, 1
- sub eax, [z]
- imul eax, [x]
- imul eax, -1
- mov [z], eax
- invoke printf, stringFormat, [z]
- invoke getch
- invoke ExitProcess, 0
- section '.idata' data import readable
- library kernel, 'kernel32.dll',\
- msvcrt, 'msvcrt.dll'
- import kernel, ExitProcess, 'ExitProcess'
- import msvcrt,\
- printf, 'printf',\
- getch, '_getch'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement