* cormen book
[mascara-docs.git] / i86 / mtx-16-bit / mtx / samples / LAB5_FS / USER / u1.c
blob2ac76e3bc66d4de3c35087049fe2385680558f55
1 #include "type.h"
2 #include "uio.c"
3 #include "ucode.c"
4 int color;
6 int in, out, err;
8 main()
9 {
10 char name[64]; int pid, cmd;
11 pid = getpid();
12 color = 0x000C;
14 printf("process %d open /dev/tty0 as stdin, stdout, stderr\n", pid);
16 in = open("/dev/tty0", 0);
17 out= open("/dev/tty0", 1);
18 err= open("/dev/tty0", 1);
20 printf("stdin=%d stdout=%d stderr=%d\n", in, out, err);
22 while(1){
23 pid = getpid();
26 printf("==============================================\n");
27 printf("I am proc %d in U mode: running at segment=%x\n",
28 getpid(), getcs());
30 #include "ubody.c"