Can I use a 'call gate' directly from C?
How?
pepito
Call gate from C
RE:Call gate from C
It depends on the compiler.
Make a FAR function pointer variable, and assign a pointer with the call gate as a segment to it. Then call through it.
Exactly how you accomplish this depends on your compiler.
Make a FAR function pointer variable, and assign a pointer with the call gate as a segment to it. Then call through it.
Exactly how you accomplish this depends on your compiler.
RE:Call gate from C
Yes, you can use DJGPP to do this... possibly...
DJGPP has support for far calls, but I'm not sure how the implementation is written (I haven't used dos in ages ). I would imagine a lot of the implementation is based on DPMI, in which case, it's useless for OS Development. You'd have to write it yourself, which is going to require assembly language.
It's not a difficult process, anyway. Just use a little inline assembly, and you'll be all set.
Cheers,
Jeff
DJGPP has support for far calls, but I'm not sure how the implementation is written (I haven't used dos in ages ). I would imagine a lot of the implementation is based on DPMI, in which case, it's useless for OS Development. You'd have to write it yourself, which is going to require assembly language.
It's not a difficult process, anyway. Just use a little inline assembly, and you'll be all set.
Cheers,
Jeff