diff options
Diffstat (limited to 'user1.c')
-rw-r--r-- | user1.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,4 +1,4 @@ -void +int fork() { asm("mov $1, %eax"); @@ -12,19 +12,25 @@ cons_putc(int c) asm("int $48"); } -void +int puts(char *s) { int i; for(i = 0; s[i]; i++) cons_putc(s[i]); + return i; } main() { - // fork(); - puts("hello!\n"); + int pid; + pid = fork(); + if(pid == 0){ + cons_putc('C'); + } else { + cons_putc('P'); + } while(1) ; } |