Hi, if anyone can help me I will be eternally greatful.. and etc..
I'm writing an os, I know alot about asm but lack any knowledge of c.
Bascially, I've written an input function in asm that returns what the user typed. I have no trouble just using the name to load a program or to print what was typed to screen, but I can't perform and if on the input without getting a warning. Ive tried messing around with changing ints to chars and stuff, but with my lack of knowledge im really stuck. The code is below:
(The eroor I get is warnging: comparison between integer and pointer)
extern void printf();
extern void pause();
extern void reboot();
extern void cls();
extern input();
extern void loadprogram();
static int i;
int main(void)
{
printf("Kernel loaded\n\r");
printf("Press a key to clear screen\n\r");
pause();
cls();
printf("Command?");
i=input();
command(i);
pause();
}
int command(i)
{
if (i=="run") {
printf("Filename of progra to run?\n");
i=input();
loadprogram(i);
}
}