.data ;數據段
titleS db 'helloworld',0
messageS db 'hello,welcome to win32',0.code ;代碼段
start:
invoke MessageBox,NULL,offset messageS,offset titleS,MB_OK
invoke ExitProcess,NULL
end start
MASM編譯下邊invoke 會把參數從右向左入棧并調用CALLinvoke MessageBox,NULL,offset messageS,offset titleS,MB_OK那么這條語句用純匯編寫 如下:
.data ;數據段
titleS db 'helloworld',0
messageS db 'hello,welcome to win32',0.code
start:mov eax ,offset titleS mov ebx ,offset messageS push MB_OK ;將參數依次入棧push eaxpush ebxpush NULLcall MessageBox ;調用MessageBox函數invoke ExitProcess,NULLend start