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 int fred() 00004 { 00005 printf("fred\n"); 00006 return 0; 00007 } 00008 00009 int joe() 00010 { 00011 printf("joe\n"); 00012 return 1; 00013 } 00014 00015 int main() 00016 { 00017 printf("%d\n", fred() && joe()); 00018 printf("%d\n", fred() || joe()); 00019 printf("%d\n", joe() && fred()); 00020 printf("%d\n", joe() || fred()); 00021 printf("%d\n", fred() && (1 + joe())); 00022 printf("%d\n", fred() || (0 + joe())); 00023 printf("%d\n", joe() && (0 + fred())); 00024 printf("%d\n", joe() || (1 + fred())); 00025 00026 return 0; 00027 }