Part 1: Compile with MASM

>> Thursday, October 22, 2009



Create a file name test.asm

.486 
.model flat, stdcall
option casemap
:none


MessageBoxA PROTO STDCALL
:DWORD, :DWORD, :DWORD, :DWORD
ExitProcess PROTO STDCALL
:DWORD

.data
ttl db
'11111',0
.code
start
:
invoke MessageBoxA
,0,offset ttl,offset ttl,0
invoke ExitProcess
,0
end start


Now compile and link with command:
ml /coff test.asm /link kernel32.lib user32.lib

0 comments: