00001 #include "syscall.h"
00002
00003 int
00004 main()
00005 {
00006 SpaceId newProc;
00007 OpenFileId input = ConsoleInput;
00008 OpenFileId output = ConsoleOutput;
00009 char prompt[2], ch, buffer[60];
00010 int i;
00011
00012 prompt[0] = '-';
00013 prompt[1] = '-';
00014
00015 while( 1 )
00016 {
00017 Write(prompt, 2, output);
00018
00019 i = 0;
00020
00021 do {
00022
00023 Read(&buffer[i], 1, input);
00024
00025 } while( buffer[i++] != '\n' );
00026
00027 buffer[--i] = '\0';
00028
00029 if( i > 0 ) {
00030 newProc = ForkExec(buffer);
00031 Join(newProc);
00032 }
00033 }
00034 }
00035