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 x = 'a'; 00004 char y = x; 00005 00006 char *a = "hello"; 00007 00008 printf("%s\n", a); 00009 00010 int c; 00011 c = *a; 00012 00013 char *b; 00014 for (b = a; *b != 0; b++) 00015 printf("%c: %d\n", *b, *b); 00016 00017 char destarray[10]; 00018 char *dest = &destarray[0]; 00019 char *src = a; 00020 00021 while (*src != 0) 00022 *dest++ = *src++; 00023 00024 *dest = 0; 00025 00026 printf("copied string is %s\n", destarray); 00027 00028 00029 void main() {}