
http://visual-assembler.pt.vu
;=========Procedure Declarations
; just to speed the code
;===============================
; exemple
;===============================
; PROC4 myFun: , var_1, var_2, var_3 , var_4
;
; CONST hwnd1, dd 0
; CONST po1, equ 101
; CONST buffer resb 1024
; CONST wc, resb WCLASSEX_size
;
; call SomeFunction,,,,
; leave
; ret 16
;==============================
;
; PROCn myFun: ,var_1,...,var_n
; ....
; call SomeFunction,,..,
; leave
; ret n x 4
;==============================
; remember that if you use some registers , to PUSH them to the stack
; then at the end of the function to POP them in reversse order , to restore the inicial values of them !
;==============================
or use this one:
;=========Procedure Declarations
; HLL macros - procedures
;===============================
; exemple
;===============================
; proc myFun, var1, var, var3
;
; CONST hwnd1, dd 0
; CONST po1, equ 101
; CONST buffer resb 1024
; CONST wc, resb WCLASSEX_size
;
; call SomeFunction,,,
;
; endproc
;
;===============================
; a real example
;===============================
; proc StreamInProc,a2,b2,c2,d2
; call ReadFile,,,,,0
; xor eax,eax
; endproc
;==============================
here an example using the first one:
%include '\lab\vasm\inc\nagoa.inc'
..start:
call GetModuleHandleA, NULL
CONST hInstance, dd 0
mov , eax
CONST DIALOG_ID, equ 1000
call DialogBoxParamA, ,DIALOG_ID, 0, @Dialog1Proc, 0
call ExitProcess,
PROC4 @Dialog1Proc: ,hwnd,uMsg,wParam,lParam
switch
case dword WM_INITDIALOG
je wminitdialog
break
case dword WM_COMMAND
je near wmcommand
break
case dword WM_CLOSE
je near wmclose
break
jmp unhandled
switchend
;--------------
unhandled:
mov eax,0 ;return false see win32api.hlp
leave
ret 16
;--------------
wminitdialog:
mov eax,1
jmp unhandled
;--------------
wmcommand:
switch
case byte 1
call MessageBoxA ,0,"info 1","title 1",MB_OK
break
case byte 2
call MessageBoxA ,0,"info 2","title 2",MB_OK
break
switchend
jmp unhandled
;------------
wmclose:
call ExitProcess,0
leave
ret 16
;============ DialogProc
http://visual-assembler.pt.vu
Would you mind to post a screenshot in this messageboard or in your homepage? I really want to see the ui of Nagoa before the downloading.