flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tommy
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 |
|||
![]() |
|
roticv
If you are using the package downloaded from flatassembler.net, look into stdcall.inc It should answer your question....
|
|||
![]() |
|
vid
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. ![]() |
|||
![]() |
|
saltmakrell
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! |
|||
![]() |
|
Tommy
You're welcome!
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.