#include "type.h" #include "const.h" #include "protect.h" #include "string.h" #include "proc.h" #include "global.h" #include "proto.h" #include "stdio.h" int main(int arg, char *argv[]) { int pid = fork(); volatile int i; if (pid == 0) { int stdin = open("dev_tty0", O_RDWR); int stdout = open("dev_tty0", O_RDWR); int stderr = open("dev_tty0", O_RDWR); while(1) { printf("\x1b[32;40mAAA "); i=100000000; while(--i); } } else { int stdin = open("dev_tty1", O_RDWR); int stdout = open("dev_tty1", O_RDWR); int stderr = open("dev_tty1", O_RDWR); while(1) { char* s = "\x1b[33;40mBBB "; for (char* p = s; *p != 0; p++ ){ write(stdout, p, 1); } i=100000000; while(--i); } } return 0; }