void get_date(int *day, int *month, int *year) { asm("int $0x30":"=a"(*day), "=b"(*month), "=c"(*year):"a"(7)); } void get_time(int *hour, int *min, int *sec) { asm("int $0x30":"=a"(*hour), "=b"(*min), "=c"(*sec):"a"(8)); } void help() { int i; for(i = 0; i <= lastCommandID; i++) { printf("%s %s\n", commands[i], descriptions[i]); } } void time() { int year, month, day, hour, min, sec; get_date(&year, &month, &day); get_time(&hour, &min, &sec); printf("It's the %d.%d.%d at %d:%d:%d\n", year, month, day, hour, min, sec); } void pagingtest() { char *test = (char*)0x400000; printf(test); } void about() { set_color(0x09); printf("LF OS Version: 1.0 Alpha 5 / Kernel 2\n" "Copyright (c) 2010 LittleFox \n" "Visit www.lf-os.tk for lastest updates and informations.\n" "If you are from Germany, you can visit my homepage and look in my forum.\n" "There will be the lastest update informations, too.\n\n" "This version of the LF OS Shell was built on %s at %s.\n", __DATE__, __TIME__); set_color(0x07); } void reboot() { asm("int $0x30"::"a"(4), "b"(1)); } void poweroff() { asm("int $0x30"::"a"(4), "b"(0)); } void cls() { clear_screen(); asm("int $0x30"::"a"(5), "b"(-1), "d"(2)); }