System Calls Question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Neoncore
Posts: 14
Joined: Sat Jun 25, 2011 1:49 pm

System Calls Question

Post by Neoncore »

Hello,
I've been using JamesM Tutorials and I Finally Implanted all of it , though I've noticed that System calls won't return the values from the Function.

as for example if I called syscall_fopen(); and fopen function returns a File Pointer , there is no way for this value to return..I rather get the sycall number.

thanks and sorry for my low knowledge :(
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: System Calls Question

Post by Nessphoro »

Well, as far as I recall Mr.Molloy uses EAX for syscall numbers, and cdecl uses EAX to return stuff. So your best bet would be to look into that.
Neoncore
Posts: 14
Joined: Sat Jun 25, 2011 1:49 pm

Re: System Calls Question

Post by Neoncore »

Ok I finally found the problem (thanks GOD!)

mainly , In JamesM tutorials the handlers gets a copy of the registers(eax, edi...) so any changes to it wouldn't change the actual value in the stack , so to overcome this you have to change the handlers to get the pointers of the stack structure so you pass the actual address of the registers struct to the handlers so you can make changes to them when being popped back!

thanks )))
Post Reply