OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 12, 2024 3:53 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: help!
PostPosted: Sat Feb 19, 2005 7:58 am 
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 ??? ???


Top
  
 
 Post subject: Re:help!
PostPosted: Sat Feb 19, 2005 8:01 am 
Code:
#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.


Top
  
 
 Post subject: Re:help!
PostPosted: Sat Feb 19, 2005 8:05 am 
ok im readiny kernel 101 at the moment so i dont need any help from anyone


Top
  
 
 Post subject: Re:help!
PostPosted: Sat Feb 19, 2005 8:22 am 
Offline
Member
Member

Joined: Wed Oct 18, 2006 11:59 am
Posts: 1600
Location: Vienna/Austria
A bit more politeness is always of help.

_________________
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image


Top
 Profile  
 
 Post subject: Re:help!
PostPosted: Sat Feb 19, 2005 1:46 pm 
Offline
Member
Member
User avatar

Joined: Sat Oct 23, 2004 11:00 pm
Posts: 1223
Location: Sweden
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


Top
 Profile  
 
 Post subject: Re:help!
PostPosted: Sun Feb 20, 2005 5:31 am 
Perhaps a more descriptive topic othe than 'help!' might help too.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group