Extended keywords in 80x86-family C's
Samurai Cat
beng at microsoft.UUCP
Sun Jul 2 06:42:15 AEST 1989
In article <213 at tnl.UUCP> gwollman at tnl.UUCP (Garrett A. Wollman) writes:
|
| Basically, I need to declare a pointer to a far pointer to a far pascal
| function.
Try
int (pascal far * *f00)(int);
which works for me (using MS C 5.10). Usage example:
int (pascal far * *f00)(int) = NULL;
int (pascal far *funcptr)(int) = NULL;
extern int far pascal catbox( int );
void no_means_no( void )
{
funcptr = catbox;
f00 = &funcptr;
}
This will compile into something suspiciously similar to
mov WORD PTR _funcptr, OFFSET CATBOX
mov WORD PTR _funcptr+2, SEG CATBOX
mov WORD PTR _f00, OFFSET DGROUP:_funcptr
(modulo sticky func-call residue)
--
Ben Goetter microsoft!beng
standard funky disclaimers in full effect, etc., etc.
More information about the Comp.lang.c
mailing list