Mercurial > hg > CbC > old > device
annotate test/tmp4.c @ 868:c55337499f96
remove warnings and error from test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 01 Apr 2014 02:42:22 +0900 |
parents | c2c709727221 |
children |
rev | line source |
---|---|
725
3f1f6c0610c1
goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
720
diff
changeset
|
1 #define __environment _CbC_environment |
3f1f6c0610c1
goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
720
diff
changeset
|
2 #define __return _CbC_return |
3f1f6c0610c1
goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
720
diff
changeset
|
3 |
0 | 4 #include "stdio.h" |
5 | |
6 int | |
7 main(ac,av) | |
8 int ac; | |
9 char *av[]; | |
10 { | |
11 int i; | |
12 i=main0(ac,av); | |
748
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
13 fprintf(stdout,"#0012:1: %s %d\n",av[0]+2,i); |
172 | 14 return 0; |
0 | 15 } |
16 | |
17 int | |
18 main0(ac,av) | |
19 int ac; | |
20 char *av[]; | |
21 { | |
22 int i,j,k; | |
23 i=123; | |
24 j=456; | |
25 k=789; | |
748
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
26 fprintf(stdout,"#0025:2: %s\n",av[0]+2); |
720 | 27 goto code0(i,j,k,av,__return,__environment); |
0 | 28 } |
29 | |
622 | 30 __code code0(i,j,k,av,ret,retenv) |
0 | 31 int i,j,k; |
32 char *av[]; | |
622 | 33 __code (*ret)(); |
0 | 34 void *retenv; |
35 { | |
36 char *p; | |
180 | 37 p = av[0]+2; |
748
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
38 fprintf(stdout,"#0037:3: i=%d j=%d k=%d av[0]=%s p=%s\n",i,j,k,av[0]+2,p); |
0 | 39 goto code1(i,j,k,av,ret,retenv); |
40 } | |
41 | |
622 | 42 __code code1(i,j,k,av,ret,retenv) |
0 | 43 int i,j,k; |
44 char *av[]; | |
622 | 45 __code (*ret)(); |
0 | 46 void *retenv; |
47 { | |
748
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
48 fprintf(stdout,"#0047:4: %s\n",av[0]+2); |
0 | 49 goto code2(i,j,k,av,ret,retenv); |
50 } | |
51 | |
622 | 52 __code code2(i,j,k,av,ret,retenv) |
0 | 53 int i,j,k; |
54 char *av[]; | |
622 | 55 __code (*ret)(); |
0 | 56 void *retenv; |
57 { | |
748
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
58 fprintf(stdout,"#0057:5: %s\n",av[0]+2); |
c2c709727221
i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
725
diff
changeset
|
59 fprintf(stdout,"#0058:5: i=%d j=%d k=%d\n",i,j,k); |
725
3f1f6c0610c1
goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
720
diff
changeset
|
60 goto (*ret)(1234,retenv); |
0 | 61 } |