2017-11-22 19:57:43 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#if defined _WIN32 && !defined __TINYC__
|
2017-11-27 03:09:50 +03:00
|
|
|
# define _ "_"
|
2017-11-22 19:57:43 +03:00
|
|
|
#else
|
2017-11-27 03:09:50 +03:00
|
|
|
# define _
|
2017-11-22 19:57:43 +03:00
|
|
|
#endif
|
|
|
|
|
2017-11-27 03:09:50 +03:00
|
|
|
static int x1_c(void)
|
|
|
|
{
|
|
|
|
printf("x1\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
asm(".text;"_"x1: call "_"x1_c; ret");
|
2017-11-22 19:57:43 +03:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2017-11-27 03:09:50 +03:00
|
|
|
asm("call "_"x1");
|
|
|
|
asm("call "_"x2");
|
|
|
|
asm("call "_"x3");
|
2017-11-22 19:57:43 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static
|
|
|
|
int x2(void)
|
|
|
|
{
|
|
|
|
printf("x2\n");
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern int x3(void);
|