flat assembler
Message board for the users of flat assembler.

Index > Windows > Pop + push = error :S

Author
Thread Post new topic Reply to topic
[nuß]



Joined: 30 Apr 2004
Posts: 4
[nuß] 01 May 2004, 11:44
Code:
include '%fasminc%/win32ax.inc'

.code

start:
   call delta
delta:
   pop ebp
   sub ebp, delta
.end start    


if i compile this and run it, it comes up with 1 of those win xp error reports....i found out also, that even if i only pop/push/pop+push in my code, it does the same....why is this?

by the way, the code above is to get the delta offset...
Post 01 May 2004, 11:44
View user's profile Send private message Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard 01 May 2004, 11:50
you don't have any exit point in your program. You should add something like:
Code:
invoke ExitProcess,0    

before ".end start"


Last edited by decard on 01 May 2004, 12:11; edited 1 time in total
Post 01 May 2004, 11:50
View user's profile Send private message Visit poster's website Reply with quote
[nuß]



Joined: 30 Apr 2004
Posts: 4
[nuß] 01 May 2004, 12:03
oh yeah, ty Embarassed
Post 01 May 2004, 12:03
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 01 May 2004, 12:50
you could do a "RET" as well, but I would suggest ExitProcess anyway. Also, if you want to work on all win32 versions, you *must* end up importing from kernel32, so ExitProcess is a good import anyway Smile
Post 01 May 2004, 12:50
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.