flat assembler
Message board for the users of flat assembler.
Index
> Windows > Stack frames |
Author |
|
decard 30 Apr 2004, 16:24
I'm not sure, but it seems that the stack pointer should be 4-byte aligned. In real (16-bit) mode it should work ok). In 32-bit you should align to dword anything that you put on the stack. I'm not exactly sure why, but it is
|
|||
30 Apr 2004, 16:24 |
|
roticv 30 Apr 2004, 17:02
I think decard is right. The stack should be aligned to dword as far as possible.
|
|||
30 Apr 2004, 17:02 |
|
vid 30 Apr 2004, 20:03
in docs it is writen exactly as decard and roticv told: stack SHOULD be aligned to dword. Nothing about why / what happens if not (of course that some extra processor clocks are taken, but no reason for bug).
Stack is very dangerous to play with (or use in some slightly instandard) under windoze. just some note: stack aligning is nicely done with "and" instruction: Code: and esp,align_size - 1 |
|||
30 Apr 2004, 20:03 |
|
Tommy 01 May 2004, 06:33
Thanks! I was thinking about the same before I fell to sleep yesterday, but I was not sure... Thanks again!
/Tommy |
|||
01 May 2004, 06:33 |
|
Tommy 01 May 2004, 10:09
Well, thanks guys... That problem is now fixed... May I ask you for another favour? Can someone help me debug the attached program (no asm code included since this file was produced by my compiler)... Thanks!
(The bug occurs while registering the window class)... Sorry if this is a bit off-topic, but... /Tommy
|
|||||||||||
01 May 2004, 10:09 |
|
roticv 01 May 2004, 12:12
If you ask me, your code is wrong...
I think it should be if (RegisterClass(wc)==0) { ShowError("Could not register window class!"); } |
|||
01 May 2004, 12:12 |
|
Tommy 01 May 2004, 13:45
It is... My fault... But when I correct it... It doesn't help... The class is obviously not registered properly.... See attachment...
|
|||||||||||
01 May 2004, 13:45 |
|
Tommy 01 May 2004, 14:03
Forget it... I solved the problem... Thanks anyway! Thanks for all help!
Cheers, Tommy |
|||
01 May 2004, 14:03 |
|
Tommy 12 May 2004, 11:06
Hi again guys!
Once again I have a problem related to the Win32 PE format... Why doesn't the attached executable work?? (I've also attached the source codes, not ASM, but sources for my own compiler... They won't help for solving the bug...) If anybody can help me, please! (I know it's a bit off-topic...but...) Thanks! Regards, Tommy
|
|||||||||||
12 May 2004, 11:06 |
|
roticv 12 May 2004, 11:12
Doesn't work as in? It does work on my win2k though.
|
|||
12 May 2004, 11:12 |
|
Tommy 12 May 2004, 12:44
Hmm.. Not on XP...
|
|||
12 May 2004, 12:44 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.