コード例 #1
0
ファイル: kmain.c プロジェクト: inkv/ACSO
//welcome message
void cmd_welcome(char ret_name[])
{
    char name[20];
    clrscr(); //clear the screen
    putsn("================================================");
    putsn("Welcome to the alpha version of Micro-Mini OS :)");
    putsn("================================================");
    getchar();
    new_line();
    putsn("What is your name Mr. Stranger ?");
    puts("Name: ");
    gets(name); new_line(); new_line();
    if(strcpy(ret_name,name)==0) putsn("Error: invalid name(ret_name is not equal with name) ");
    puts("OK, i will call you "); putsn(name);
    cmd_hello(name); //greets the user
    return;
}
コード例 #2
0
ファイル: video.c プロジェクト: lesh1k/ACSO_Labs
void commandPrompt(){

    char* vidmem = (char *) 0xb8000;
    char myString[256];


    puts("Your order, Master:");
    gets(myString);
    if (strcmp(myString,"clrscr")){
      clrscr();
    }
    else if (strcmp(myString,"hello")){
      cmd_hello();
    }
    else if (strcmp(myString,"happiness")){
      cmd_happiness();
    }
    else{
      puts("You typed:");
      puts(myString);
      NewLine();
      scrollDown();
    }
};