|
format PE console
entry start
include 'C:\fasm\include\win32ax.inc'
section '.idata' import data readable
library kernel,'kernel32.dll', msvcrt,'msvcrt.dll', User32,'User32.dll'
import kernel, ExitProcess,'ExitProcess'
import msvcrt, printf,'printf'
import User32, wsprintf,'wsprintfA'
section '.data' data readable writeable
strInteger db '%d', 13, 10 , 0
strBuffer rb 64
a_msg db 'a: ', 0
section '.code' code readable executable
start:
mov eax, -22
mov ebx, 10
xor edx, edx
div ebx
mov esi, eax
ccall [wsprintf], strBuffer, strInteger, esi
ccall [printf], a_msg
ccall [printf], strBuffer
stdcall [ExitProcess],0
|