Feat: better screen formating & better project resstructure
This commit is contained in:
@@ -20,28 +20,23 @@ typedef struct {
|
||||
void kmain(void) {
|
||||
user current_user = {.user_name = "admin", .user_hostname = "soraos", .user_id = 0};
|
||||
|
||||
__clear_screen();
|
||||
clear_screen();
|
||||
|
||||
printf("SoraOS Kernel Initialized\n");
|
||||
printf("\tWelcome to SoraOS\n");
|
||||
printf("\tKernel Version %s\n", __KERNEL_VERSION);
|
||||
printf("\tCompiled on: %s at %s\n\n", __DATE__, __TIME__);
|
||||
|
||||
// TODO: CLI IDEA
|
||||
int _count = printf("%s@%s:>", current_user.user_name, current_user.user_hostname);
|
||||
scursor(_count, text_pos.line);
|
||||
while (1) {
|
||||
// TODO: CLI IDEA
|
||||
printf("%s@%s:$ ", current_user.user_name, current_user.user_hostname);
|
||||
|
||||
// TODO: Enable user input handling
|
||||
char input_buffer[256] = {0};
|
||||
scanf("%s", input_buffer);
|
||||
printf("You entered: %s\n", input_buffer);
|
||||
// TODO: Enable user input handling
|
||||
char input_buffer[256] = {0};
|
||||
scanf("%s", input_buffer);
|
||||
printf("echo: %s\n", input_buffer);
|
||||
}
|
||||
|
||||
int num1, num2;
|
||||
printf("Enter num1: ");
|
||||
scanf("%d", &num1);
|
||||
printf("Enter num2: ");
|
||||
scanf("%d", &num2);
|
||||
printf("You entered: %d and %d\n", num1, num2);
|
||||
// Infinite loop
|
||||
while (1) {
|
||||
__asm__ volatile("hlt");
|
||||
|
||||
Reference in New Issue
Block a user