Heres the source anyway :
- Code: Select all
#include <iostream.h>
/*
*Microsoft DOS 98 Source Code - Credits to X11 for his Dos XP project which this is based on
*/
int ver()
{
cout << "Microsoft DOS 98 Home Build 20031502\n"
"Copyright Microsoft Corp 2003\n"
"=============================\n\n";
return 0;
}
// Main Function
// This contains the main features, how ever I will move the command loop
// or the commands into different function(s).
int main(char* args[], int nargs)
{
char cmdi[200]; //sets a char array for the Command Input
char cd[100]; // sets char array for the cd command
char cdcom[50]; // sets char array for the commands inside the cd command
int exitlevel; //Sets the exitlevel
int errorlevel; //Sets the errorlevel
int cdlevel;
ver(); //Prints Version.
exitlevel = 0; //sets exitlevel to 0
errorlevel = 0; //Sets errorlevel to 0
cdlevel = 0;
while (exitlevel == 0) //Starts the "Command Loop"
{ //(Which might be moved into a function.
errorlevel = 1;
cout << "C:\\>"; //Writes C:\>
cin >> cmdi; //Input thingy
if (strcmp(cmdi, "exit") == 0) // The Exit Command
{
exitlevel = 1; // Sets exitlevel
errorlevel = 0; //sets errorlevel
}
if (strcmp(cmdi, "ver") == 0) //prints the version
{
ver();
errorlevel = 0;
}
if (strcmp(cmdi, "help") == 0) //prints the help (not yet done
{ //will become help() function!
cout << "Microsoft DOS 98 Help:\nNo help availiable at this time, work it out yourself";
errorlevel = 0;
}
if (strcmp(cmdi, "credits") == 0)
{
cout << "Mostly 'borrowed' from X11's DOS XP Project and added to by Doogee - doogee@punkass.com\n";
errorlevel = 0;
}
if (strcmp(cmdi, "cd") == 0)
cout << "cd to where:specify a directory\nDirectory: ";
cin >> cd;
if (strcmp(cd, "windows") == 0)
while (cdlevel == 0)
{
cout << "C:\\windows\\>";
cin >> cdcom;
if (strcmp(cdcom, "dir") == 0)
{
cout << "Directory contents of c:\\windows:\n";
}
if (strcmp(cdcom, "cd..") == 0)
// This is where i want it to go back to C:\\>
}
if (errorlevel == 1) //Prints errorlevel
{
cout << "Bad Command or file name\n\n";
errorlevel = 0;
}
}
cout << "Thankyou for using Dos 98...\n\nKERNEL FAILURE in MCDCTRL.DLL at 0e3FF 44PGE\nContact you're hardware vendor\n";
return 0;
}



