help!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
thomas

help!

Post by thomas »

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 ??? ???
Curufir

Re:help!

Post by Curufir »

Code: Select all

#include <cstdlib>
#include <iostream>
#include <conio.h>
#include <limits>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
The functions described in these headers aren't going to be at your disposal until such time as you write the appropriate library yourself. The FAQ (afaik) gives some help on getting a basic C++ environment up and running.
thomas

Re:help!

Post by thomas »

ok im readiny kernel 101 at the moment so i dont need any help from anyone
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:help!

Post by distantvoices »

A bit more politeness is always of help.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:help!

Post by bubach »

I guess that he didn't intend to sound inpolite, but it's always good to read through the post before hitting submit.
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
IRBMe

Re:help!

Post by IRBMe »

Perhaps a more descriptive topic othe than 'help!' might help too.
Post Reply