Isaax OS 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.
Locked
thegreatstudio
Posts: 10
Joined: Fri Feb 08, 2013 1:52 am

Isaax OS help :(

Post by thegreatstudio »

There are some problems that i cant configure

Code: Select all

#include<stdio.h>

main()
{
	char help;
	int version;
	version = 14;

	printf("Welcome to Isaax OS!;");
	printf ("Please type help for commands!: \n ] ");
	scanf(%s", &help);
      if((help == "help")){
	printf("Available Commands:\n");
	printf("osver -- prints the version of this os");
}
else if((help == "osver")){
printf("your kernel version is: %d", version);
}
}
I am the creator of Isaac OS based on debian and LICENSED.
User avatar
Griwes
Member
Member
Posts: 374
Joined: Sat Jul 30, 2011 10:07 am
Libera.chat IRC: Griwes
Location: Wrocław/Racibórz, Poland
Contact:

Re: Isaax OS help :(

Post by Griwes »

Image
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
feare56
Member
Member
Posts: 97
Joined: Sun Dec 23, 2012 5:48 pm

Re: Isaax OS help :(

Post by feare56 »

There are many things wrong with this post, for one what's not working on it? Is this an OS or just a program that acts like an OS? How are you booting it? What sector are you setting it to? Lastly, don't post your code and ask us to find the error that is very frowned upon in this forum.
User avatar
CocaCola
Member
Member
Posts: 36
Joined: Fri Sep 07, 2012 9:11 am

Re: Isaax OS help :(

Post by CocaCola »

thegreatstudio wrote:There are some problems that i cant configure
Perhaps you mean you "can't figure out"?

You posted this on an OS development forum, but in your post you ask for help with a regular program.
An OS is a very special program, it is not an .exe that you can double-click on.

So if an OS is really what you want to code, read more here:
http://wiki.osdev.org/Main_Page

Anyway, here is the corrected version of your C program (not tested):

Code: Select all

#include <stdio.h>
#include <string.h>

int main(void) // return type int, and void for no parameters
{
   char help[100]; // array of char, not one single char
   int version;
   version = 14;

   printf("Welcome to Isaax OS!;");
   printf ("Please type help for commands!: \n ] ");
   scanf("%s", help); // missing quotation mark

   if (!strcmp(help, "help")) // this isn't C++
   {
      printf("Available Commands:\n");
      printf("osver -- prints the version of this os");
   }
   else if (!strcmp(help, "osver"))
   {
      printf("your kernel version is: %d", version);
   }
}
thegreatstudio
Posts: 10
Joined: Fri Feb 08, 2013 1:52 am

Re: Isaax OS help :(

Post by thegreatstudio »

Hey thanks but i just dont know how to make it loop like a terminal it doesn't stops when y ou type something. I hope you can understand what i am trying to sayh :/
I am the creator of Isaac OS based on debian and LICENSED.
thegreatstudio
Posts: 10
Joined: Fri Feb 08, 2013 1:52 am

Re: Isaax OS help :(

Post by thegreatstudio »

How do you call a funtion in the function ???

I will demonstrate my sentence

void startup()------------
|
|
|
|
int main(void) |
check() |
load() <-------------------|

void load()
I am the creator of Isaac OS based on debian and LICENSED.
User avatar
CocaCola
Member
Member
Posts: 36
Joined: Fri Sep 07, 2012 9:11 am

Re: Isaax OS help :(

Post by CocaCola »

thegreatstudio wrote:Hey thanks but i just dont know how to make it loop like a terminal it doesn't stops when y ou type something. I hope you can understand what i am trying to sayh :/
Use a loop.
thegreatstudio wrote:How do you call a funtion in the function ???
You are in the wrong forum to ask such questions. OSDev.org is not where you learn general programming.

http://www.cprogramming.com/tutorial/c-tutorial.html
Locked