练习了一下最简单的win32汇编。。。蛮有意思的。
.386
.model flat, stdcall
option casemap : none
include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib
.data
strHello db 'Hello world', 0
.code
start:
invoke MessageBox, 0, addr strHello, addr strHello, MB_OK
invoke ExitProcess, 0
end start
用masm32编译。
ml /c /Cp /coff /I"c:\masm32\include" hello.asm
link /subsystem:windows /libpath"c:\masm32\lib" hello.obj
.386
.model flat, stdcall
option casemap : none
include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib
.data
strHello db 'Hello world', 0
.code
start:
invoke MessageBox, 0, addr strHello, addr strHello, MB_OK
invoke ExitProcess, 0
end start
用masm32编译。
ml /c /Cp /coff /I"c:\masm32\include" hello.asm
link /subsystem:windows /libpath"c:\masm32\lib" hello.obj
我们都在路上。。。。。