flat assembler
Message board for the users of flat assembler.

Index > Windows > How to call a procedure from a procedure

Author
Thread Post new topic Reply to topic
rinart73



Joined: 11 Dec 2014
Posts: 16
rinart73
Code:
proc test
call test2
;some code, but this isn't works
ret
endp

proc test2
;some code
ret
endp
    

So, what I need to do, that "ret" returns me to a upper level, not to .start?
Post 11 Dec 2014, 19:55
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17278
Location: In your JS exploiting you and your system
revolution
You need to show all your code because the example you posted is fine.
Post 11 Dec 2014, 23:07
View user's profile Send private message Visit poster's website Reply with quote
TheRaven



Joined: 22 Apr 2008
Posts: 89
Location: U.S.A.
TheRaven
It appears that if the code is not working in procedure one that code is fubar if and only if the code in procedure 2 is proven to work.

If procedure 2 screws up it will obviously not return to procedure 1; do not assume procedure 1 is to blame unless you know for certain that procedure 2 functions properly.

OllyDebug it or stub the code using a console and printf at the start and just before the return of both procedures for trace for a quick & dirty.
Post 15 Jan 2015, 13:22
View user's profile Send private message 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-2020, Tomasz Grysztar.

Powered by rwasa.