Page 1 of 1

Calling a call-gate in C

Posted: Sat Nov 22, 2003 12:00 am
by Peterdh
How do I make a far call to a call gate(or another segment) in c?

I would like to write the following code in C:
call 0008h:00000000h ;Call Kernel

Is there any doc/tutorial on how to use segments in c?
Or is at all possible?

RE:Calling a call-gate in C

Posted: Sun Nov 23, 2003 12:00 am
by Xenos
It depends on which C compiler you use. Most of them (including gcc and its relatives) do not support 32bit far pointers. If you have one of them, you'll need (inline) assembly. The only C compiler I know to support 32bit far pointers is Watcom, but I haven't used it to make a far call yet. Perhaps you can find more information on this at http://www.openwatcom.org