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
|
00001 #include <stdio.h> 00002 00003 void fred(int x) 00004 { 00005 switch (x) 00006 { 00007 case 1: printf("1\n"); return; 00008 case 2: printf("2\n"); break; 00009 case 3: printf("3\n"); return; 00010 } 00011 00012 printf("out\n"); 00013 } 00014 00015 int main() 00016 { 00017 fred(1); 00018 fred(2); 00019 fred(3); 00020 00021 return 0; 00022 } 00023