.data?
wShow dw ?
wFree dw ?
dShow dd ?
;**************************************************
.code
_MainProc proc uses ebx edi esi hWnd,uMsg,wParam,lParam
mov eax,uMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_COMMAND
mov eax,wParam
.if eax == ID_INC
Call _IncCounter
invoke SetDlgItemInt,hWnd,IDC_COUNTER,eax,FALSE
.elseif eax == ID_DEC
Call _DecCounter
invoke SetDlgItemInt,hWnd,IDC_COUNTER,eax,FALSE
.elseif ax == IDC_NUM1 || ax == IDC_NUM2
push eax
mov wShow,ax
;mov dShow,eax
;pop dShow
invoke SetDlgItemInt,hWnd,IDC_AX,dword ptr wShow,FALSE
pop dShow
invoke SetDlgItemInt,hWnd,IDC_wParam,dShow,FALSE
invoke GetDlgItemInt,hWnd,IDC_NUM1,NULL,FALSE
push eax
invoke GetDlgItemInt,hWnd,IDC_NUM2,NULL,FALSE
pop ecx
invoke _Mod,ecx,eax
invoke SetDlgItemInt,hWnd,IDC_MOD,eax,FALSE
.endif
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
_MainProc endp