home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
OS2
/
EMXFIX04.ZIP
/
C16TEST1.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-23
|
451b
|
24 lines
/* c16test1.c (emx+gcc) */
/* Call 16-bit function linked at load time. */
#include <stdio.h>
#include <os2thunk.h>
short _THUNK_C_FUNCTION (add) (short x, short y);
short add (int x, int y)
{
return ((short)(_THUNK_C_PROLOG (2+2);
_THUNK_C_SHORT (x);
_THUNK_C_SHORT (y);
_THUNK_C_CALL (add)));
}
int main (void)
{
printf ("2+3=%d\n", add (2, 3));
return (0);
}