flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
OzzY 01 Mar 2006, 17:01
I changed to this and worked:
Code: include '%fasminc%\Win32ax.inc' include '%fasminc%\macro\if.inc' IDD_DLG1 equ 1 BTNEXIT equ 1000 IDC_GRP1 equ 1001 EDITTEXT equ 1002 main: invoke GetModuleHandle,0 invoke DialogBoxParam,eax,1,0,DlgProc,0 invoke ExitProcess,0 proc DlgProc,hWnd,uMsg,wParam,lParam .if [uMsg]=WM_CLOSE invoke EndDialog,[hWnd],1 .elseif [uMsg]=WM_COMMAND mov eax,[wParam] .if ax=BTNEXIT push [hWnd] call ExitProg .endif .endif xor eax,eax ret endp data resource from 'test.res' end data proc ExitProg,hwnd invoke MessageBox,[hwnd],"Exit?","Dialog Test",MB_YESNO .if eax = IDNO ;IF I UNCOMMENT CONDITIONS LIKE THIS THE DIALOG WON'T SHOW ANYMORE ret ;WHAT'S WRONG? IT SEEMS THAT WHEN I ADD MORE CODE THE DIALOG WON'T SHOW .endif invoke EndDialog,[hwnd],1 ret endp .end main Why? |
|||
![]() |
|
Madis731 02 Mar 2006, 08:18
If you end data - the assembler doesn't implicitly state that the next is .code section, but if you move your data section to the very end - the code section is contiguous.
|
|||
![]() |
|
Vasilev Vjacheslav 02 Mar 2006, 15:59
it's recommended to preserve main registers in DlgProc (ebx,esi,edi)
|
|||
![]() |
|
vid 02 Mar 2006, 16:02
it's required, not recommended. But he doesn't seem to change them anywhere
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.