Hello,
I have allready posted this one using other includes.
Try the edit menu --> "trouve" or "remplace" and you get
Quote
;mov ebx,st(-1) (f48.9c0): Illegal instruction windbg
INVOKE CreateDialogParam, Hmodule,addr strTrouve,hwnd, addr DlgFindReplace, 0
There is two CreateDialogParam in the edition.inc lines 292,312
Ml do not do that
MASM does use LEAVE in the epilogue, which does hide your actual problem. jWasm does pop EBP and thus requires ESP to be valid.
Did you see something to do ?.
remove the line:
push eax ; Save handle of edit1
Yep, line 88 in include.inc
These bugs are difficult to chase in ML.exe, in particular because your preserved regs look very different after the leave :badgrin:
@qWord: With the LOCAL, Jwasm behaves like ML. Without, it chokes. In any case, esi is trashed, of course.
include \masm32\include\masm32rt.inc
.code
MyTest proc uses esi arg1
LOCAL v1
push arg1
xor esi, esi ; preserved with uses
mov v1, esi
ret
MyTest endp
start:
mov esi, 123
invoke MyTest, 456
inkey str$(esi), " - should be 123"
exit
end start
Found
I have just modify the return values
DlgFindReplace PROC HdialBox:DWORD, wmsg, wparam, lparam
Local retour:DWORD
mov retour,TRUE
.if wmsg == WM_INITDIALOG ; If message is INITDIALOG then
.elseif == ..
.else
mov retour,FALSE
.endif
mov eax,retour
ret ; Return
DlgFindReplace ENDP
;###################################################################