flat assembler
Message board for the users of flat assembler.
Index
> Windows > Procedures |
Author |
|
Tommy 07 Mar 2004, 13:21
Something like (if I'm not wrong):
Code: WindowProc: hwnd equ ebp+8 wmsg equ ebp+12 wparam equ ebp+16 lparam equ ebp+20 push ebp mov ebp,esp ; code goes here... mov esp,ebp pop ebp ret 4*4 Best regards, Tommy Last edited by Tommy on 07 Mar 2004, 14:25; edited 2 times in total |
|||
07 Mar 2004, 13:21 |
|
roticv 07 Mar 2004, 13:31
If you are using the package downloaded from flatassembler.net, look into stdcall.inc It should answer your question....
|
|||
07 Mar 2004, 13:31 |
|
vid 07 Mar 2004, 14:05
instead of 'enter x,0' use rather
push ebp mov ebp,esp sub esp,x ;x is size of local variables instead of 'leave' mov esp,ebp pop ebp this wy you see better how it works and never forget to remove parameters at rtuening (like 'retn 16', not 'retn'). It causes bug on ME/SE/95/98 but doesn't at XP. |
|||
07 Mar 2004, 14:05 |
|
saltmakrell 07 Mar 2004, 22:21
It worked very well with your code Tommy, if I just added DWORD before som variables in the code. After studying your code, and the stdcall.inc-macro, I found out more about how the macro actually processes it. I think it is something like this if I'm right:
<< WindowProc: virtual at ebp+8 _hwnd dd ? _wmsg dd ? _wparam dd ? _lparam dd ? end virtual hwnd equ _hwnd wmsg equ _wmsg wparam equ _wparam lparam equ _lparam >> When using this I don't need to pass the DWORD-word before the variables in the code. Thank you alot. I have learned quite much from this. Ruben PS: Du har rett Tommy, med det at jeg er fra Norge! |
|||
07 Mar 2004, 22:21 |
|
Tommy 08 Mar 2004, 10:57
You're welcome!
|
|||
08 Mar 2004, 10:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.