feature: print_stack working (dont use opti flags, else the stack is broken)

This commit is contained in:
2024-09-17 11:10:41 +02:00
parent 963bf46b62
commit a02931a165
10 changed files with 53 additions and 25 deletions

View File

@ -29,6 +29,8 @@ static CMD_TOK find_command(char *line)
command = POWEROFF;
else if (!strcmp(line, "halt"))
command = HALT;
else if (!strcmp(line, "stack"))
command = STACK;
else if (!strcmp(line, "echo"))
command = ECHO;
else if (!strcmp(line, "color"))
@ -95,6 +97,9 @@ void shell_init(void)
case HALT:
halt();
break;
case STACK:
print_stack();
break;
case ECHO:
kprintf(0, "echoing\n");
break;

View File

@ -27,8 +27,8 @@ void reboot(void)
} while (check_flag(tmp, KBD_BIT_UDATA));
outb(KBD_INTERFACE, KBD_RESET); /* pulse CPU reset line */
loop:
asm volatile("hlt"); /* if that didn't work, halt the CPU */
goto loop; /* if a NMI is received, halt again */
asm volatile("hlt");
goto loop;
}
void halt(void)

View File