Page 1 of 1

System Calls Question

Posted: Sat Sep 08, 2012 8:39 pm
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 :(

Re: System Calls Question

Posted: Sat Sep 08, 2012 8:52 pm
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.

Re: System Calls Question

Posted: Mon Sep 10, 2012 9:31 am
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 )))