Page 1 of 1

APIs

Posted: Tue Apr 15, 2003 11:00 pm
by hAr|
What is idea with gates (I know something litle). What's heapened with CS, DS, SS registers?

RE:APIs

Posted: Tue Apr 15, 2003 11:00 pm
by Anton
Nothing happend to them. A gate is just a safe way to make a call. Say you need to call a fucntion in the kernel(level 0) from level 3. If no  gates existed, then how could you sitch to level 0(level 3 does not have privilage to do that)? And how can you garanty that the calling program's stack is big enougth(or you can have a stack overflow hack), and that the call is made at the right entry place? Thats why you need gates: they switch the stack, runlevel, and start execution at a point deffined by the gate, so CS, SS are changed accourdingly.
Anton.