i have a boot loader but i need some help making the kernel i have made a very small version of it in c++ but is a console aplication
//==============================================================================
// tiny os V.1.0
// kernel-main
//==============================================================================
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <limits>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
using namespace std;
int mycomputer();
int aplications();
int shutdown();
int main()
{
float input;
{
fflush(stdin);
cout<<"\nTiny OS V.1.0\n\n";
cout<<"1. my computer\n";
cout<<"2. aplications\n";
cout<<"3. shutdown\n\n";
cout<<"Selection: ";
cin>> input;
switch ((int)input)
{ case 1:
mycomputer();
getch();
break;
case 2:
aplications();
getch();
break;
case 3:
shutdown();
getch();
break;
default:
cout<<"\nError bad input\n\n";
cin.clear();
cin.ignore(std::numeric_limits < int >::max(), '\n');
main();
break;
}
}
}
int mycomputer()
{
float input;
{
fflush(stdin);
cout<<"my computer";
cout<<"1. about my computer\n";
cout<<"Selection: ";
cin>> input;
switch ((int)input)
{ case 1:
//dont know what to put yet
break;
default:
cout<<"\nError bad input\n\n";
cin.clear();
cin.ignore(std::numeric_limits < int >::max(), '\n');
main();
break;
}
int aplications();
{
float input;
{
fflush(stdin);
cout<<"\naplications\n\n";
cout<<"1.back to main menu \n";
cout<<"2.calculator\n\n";
cout<<"Selection: ";
cin>> input;
switch ((int)input)
{ case 1:
main();
getch();
break;
case 2:
system ("calculator.exe");
default:
cout<<"\nError bad input\n\n";
cin.clear();
cin.ignore(std::numeric_limits < int >::max(), '\n');
main();
break;
}
}
}
int shutdown()
{
//shuts down
}
can you tell me what to add im geussing i have to add hardware interupts ??? ???
help!
Re:help!
Code: Select all
#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <limits>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:help!
A bit more politeness is always of help.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:help!
I guess that he didn't intend to sound inpolite, but it's always good to read through the post before hitting submit.