This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.386 | |
.model flat, stdcall | |
option casemap :none | |
include \masm32\include\windows.inc | |
include \masm32\include\kernel32.inc | |
include \masm32\include\user32.inc | |
includelib \masm32\lib\kernel32.lib | |
includelib \masm32\lib\user32.lib | |
.data | |
HelloWorld db "Hello World!", 0 | |
.code | |
start: | |
invoke MessageBox, NULL, addr HelloWorld, addr HelloWorld, MB_OK | |
invoke ExitProcess, 0 | |
end start |
Pre-requisite:
- Install MASM
To assemble:
\masm32\bin\ml /c /Zd /coff hellow.asm
To link:
\masm32\bin\Link /SUBSYSTEM:WINDOWS hellow.obj
Reference(s):
This is shamelessly using contents from Windows Assembly Programming Tutorial by JEFF HUANG (huang6@uiuc.edu)
x86 Disassembly - link
No comments:
Post a Comment