/* RunProg.C Demo. program for MiniOS7. Use Ungetch() to run another program. use: please download hello.exe,hello1.exe,hello2.exe & runprog.exe then run runprog.exe */ #include void Run(char *cmd) { while(*cmd){ Ungetch(*cmd++); } Ungetch('\r'); } void main(void) { Print("Select a program to run...\n\r"); Print("1:Hello.EXE\n\r"); Print("2:Hello1.EXE\n\r"); Print("3:Hello2.EXE\n\r"); Print("4:dir\n\r"); Print("5:dir /crc\n\r"); Print("others:quit\n\r"); switch(Getch()){ case '1': Run("hello.exe"); break; case '2': Run("hello1.exe"); break; case '3': Run("hello2.exe"); break; case '4': Run("dir"); break; case '5': Run("dir /crc"); break; default: Print("Do not select program to run."); break; } }