Calling a call-gate in C

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
Peterdh

Calling a call-gate in C

Post 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?
Xenos

RE:Calling a call-gate in C

Post 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
Post Reply