53
|
1 #include "stdio.h"
|
|
2
|
|
3 struct arg {
|
|
4 int a0;int a1;int a2;int a3;int a4;
|
|
5 };
|
|
6
|
55
|
7 code carg1(int arg0,int arg1,int arg2,int arg3,int arg4,code(*exit1)(),void *env)
|
|
8 {
|
|
9 printf("arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1,env);
|
|
10 goto carg2(arg1,arg2,arg3,arg4,arg0,exit1,env);
|
|
11 }
|
|
12
|
|
13 code carg2(int arg0,int arg1,int arg2,int arg3,int arg4,code(*exit1)(),void *env)
|
53
|
14 {
|
|
15 struct arg args0;
|
|
16 printf("arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1,env);
|
|
17 args0.a0 = arg0;
|
|
18 args0.a1 = arg1;
|
|
19 args0.a2 = arg2;
|
|
20 args0.a3 = arg3;
|
|
21 args0.a4 = arg4;
|
55
|
22 goto cargs(args0,exit1,env);
|
53
|
23 }
|
|
24
|
55
|
25 code cargs(struct arg args0,code exit1(),void *env)
|
53
|
26 {
|
|
27 printf("args: %d %d %d %d %d : %x %x\n",
|
|
28 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
|
|
29 exit1,env);
|
54
|
30 goto (*exit1)(321),env;
|
53
|
31 }
|
|
32
|
|
33
|
57
|
34 code carg3(struct arg args0,struct arg args1,int i, int j,int k,int l)
|
|
35 {
|
|
36 goto carg4(args0,args1,j,k,l,i);
|
|
37 }
|
|
38
|
|
39 code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l)
|
|
40 {
|
|
41 goto carg5(args1,args0,j,k,l,i);
|
|
42 }
|
|
43
|
|
44 code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l)
|
|
45 {
|
|
46 goto carg6(i,j,k,l,args0);
|
|
47 }
|
|
48
|
|
49 code carg6(int i, int j,int k,int l,struct arg args0)
|
|
50 {
|
|
51 goto carg3(args0,args0,i,j,k,l);
|
|
52 }
|
|
53
|
54
|
54 int main1(int n)
|
|
55 {
|
55
|
56 goto carg1(0,1,2,3,4,return,environment);
|
54
|
57 return n;
|
|
58 }
|
|
59
|
53
|
60 int main( int ac, char *av[])
|
|
61 {
|
|
62 int n;
|
54
|
63 n = main1(123);
|
|
64 printf("321=%d\n",n);
|
53
|
65 }
|
|
66
|