.386
.model flat,stdcall
option casemap:none
;include 定义
include windows.inc
include gdi32.inc
includelib gdi32.lib
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
;数据段
.data?
hInstance dd ?
hWinMain dd ?
.const
szClassName db 'MyClass',0
szCptionMain db 'myfirstwindow!',0
szText db 'win32 assembly,simpler and powerful',0
;代码段
.code
_ProWinMain proc uses ebx edi esi ,hWnd,uMsg,wParam,lParam
local @stPs:PAINTSTRUCT
local @stRect:RECT
local @hDc
mov eax,uMsg
.else invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
xor eax,eax
ret
_ProcWinMain endp
; _WinMain子程序
_WinMain proc
local @stWndClass:WNDCLASSEX
local @stMsg:MSG
.386
.model flat,stdcall
option casemap:none
;include 定义
include windows.inc
include gdi32.inc
includelib gdi32.lib
include user32.inc
includelib user32.lib
include kernel32.inc
includelib kernel32.lib
;数据段
.data?
hInstance dd ?
hWinMain dd ?
.const
szClassName db 'MyClass',0
szCptionMain db 'myfirstwindow!',0
szText db 'win32 assembly,simpler and powerful',0
;代码段
.code
_ProcWinMain proc uses ebx edi esi ,hWnd,uMsg,wParam,lParam
local @stPs:PAINTSTRUCT
local @stRect:RECT
local @hDc
mov eax,uMsg
.else
invoke DefWindowProc,hWnd,uMsg,wParam,lParam ;这里错了
ret
.endif
xor eax,eax
ret
_ProcWinMain endp
; _WinMain子程序
_WinMain proc
local @stWndClass:WNDCLASSEX
local @stMsg:MSG