Hi everybody,
I've got some code below which I expected Fasm to catch error on compilation but it didn't.
; example of simplified Win32 programming using complex macro features
include "win32ax.inc"
.data
wc WNDCLASSEX ; create local variables on stack
msg MSG
hwnd dw 0
.code
start:
proc _Main
mov wc.cbSize,sizeofsdsd WNDCLASSEX ; fill values in members of wc
mov wc.style, CS_HREDRAW | CS_VREDRAW
mov wc.lpfnWndProc, asdddddddd
mov wc.cbClsExtra,NULL
mov wc.cbWndExtra,NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground,COLOR_WINDOW+1
mov wc.lpszMenuName,NULL
mov wc.lpszClassName,ClassName
invoke LoadIcon,NULL,IDI_APPLICATION
mov wc.hIcon,eax
mov wc.hIconSm,eax
invoke LoadCursor,NULL,IDC_ARROW
mov wc.hCursor,eax
invoke RegisterClassEx, wc ; register our window class
invoke CreateWindowEx,NULL,\
ADDR ClassName,\
ADDR AppName,\
WS_OVERLAPPEDWINDOW,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
NULL,\
NULL,\
hInst,\
NULL
mov hwnd,eax
invoke ShowWindow, hwnd,CmdShow ; display our window on desktop
invoke UpdateWindow, hwnd
invoke CreateWindow
invoke DialogBoxParam,NULL,IDD_DLG1001,NULL,DLG_Function,NULL
invoke MessageBox,HWND_DESKTOP,"Hi! I'm the example program!","Win32 Assembly",MB_OK
invoke ExitProcess,0
ret
endp
proc DLG_Function,hwnd,uMesg,wParam,lParam
ret
endp
.end start
;section '.rsrc' data readable resource from 'rc.res'
please copy the above code and compile it to see by yourself.
Anyone have any explainations. (I've added many undeclared symbol to the code but strangely, fasm compiles sucessfully to whatever what you type into. I'm using ver 1.69 now