Xv6 with picoc & Linkage editor  v1.0
The project delineate mutual cohesion between c library, linkage editor ( linker), interpreter and operating system by porting the same on xv6 kernel
 All Data Structures
54_goto.c
00001 #include <stdio.h>
00002 
00003 void fred()
00004 {
00005     printf("In fred()\n");
00006     goto done;
00007     printf("In middle\n");
00008 done:
00009     printf("At end\n");
00010 }
00011 
00012 void joe()
00013 {
00014     int b = 5678;
00015     
00016     printf("In joe()\n");
00017     
00018     {
00019         int c = 1234;
00020         printf("c = %d\n", c);
00021         goto outer;
00022         printf("uh-oh\n");
00023     }
00024 
00025 outer:    
00026     
00027     printf("done\n");
00028 }
00029 
00030 void henry()
00031 {
00032     int a;
00033     
00034     printf("In henry()\n");
00035     goto inner;
00036     
00037     {
00038         int b;
00039 inner:    
00040         b = 1234;
00041         printf("b = %d\n", b);
00042     }
00043     
00044     printf("done\n");
00045 }
00046 
00047 void main()
00048 {
00049     fred();
00050     joe();
00051     henry();
00052 }
 All Data Structures