flat assembler
Message board for the users of flat assembler.

Index > Windows > Proc problems

Author
Thread Post new topic Reply to topic
StakFallT



Joined: 19 Jan 2006
Posts: 48
StakFallT
How come when I call a procedure I made, in the attached code, it never comes back to where it was called from, even though I'm issuing a ret? Don't think I ever had that problem before, then again it's always been a windows based app I would be working on, not a console one. So maybe the stack frames are different or something along those lines?

(I know, it's kinda sloppy, and could really be cleaned up. I figured "make it work first, then worry about finese")

-- StakFallT


Description:
Download
Filename: EHook2.ASM
Filesize: 7.9 KB
Downloaded: 37 Time(s)

Post 23 Aug 2007, 23:23
View user's profile Send private message Reply with quote
Yardman



Joined: 12 Apr 2005
Posts: 245
Location: US
Yardman
[ Post removed by author. ]


Last edited by Yardman on 04 Apr 2012, 02:47; edited 1 time in total
Post 24 Aug 2007, 03:28
View user's profile Send private message Reply with quote
StakFallT



Joined: 19 Jan 2006
Posts: 48
StakFallT
Well I originally tried not to be dealing with the stack so much, but it seemed like everytime I dealt with specifying the result, of getprocaddress, in the form of a variable I had problems... Looking at it in going with the notion it definately is a stack problem, I fixed it.. It wasn't [i]exactly]/i] a balance issue. For every two pushes there were two pops, problem was, I double pushed and called a proc that then double popped (the first few lines of code in), which was a problem I guess because the stack frame (ds register right?) changes when you've moved into another procedure or so it seems.. *shrugs* It's fixed, and thanks for the help! Smile

I guess the moral of the story is sometimes when you figure problems out you need to look at it as a definate and see if it fits..

-- StakFallT


EDIT: Yeah that's the part (the wsprintf bit) I left off on and haven't worked on yet.. I stopped when I realized I wasn't getting into those procedures Wink
Post 24 Aug 2007, 05:02
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. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.