mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2024-10-27 20:34:19 +00:00
23 lines
476 B
C
23 lines
476 B
C
#include "../cpu/isr.h"
|
|
#include "../drivers/screen.h"
|
|
#include "kernel.h"
|
|
#include "../libc/string.h"
|
|
|
|
void main() {
|
|
isr_install();
|
|
irq_install();
|
|
|
|
kprint("Type something, it will go through the kernel\n"
|
|
"Type END to halt the CPU\n> ");
|
|
}
|
|
|
|
void user_input(char *input) {
|
|
if (strcmp(input, "END") == 0) {
|
|
kprint("Stopping the CPU. Bye!\n");
|
|
asm volatile("hlt");
|
|
}
|
|
kprint("You said: ");
|
|
kprint(input);
|
|
kprint("\n> ");
|
|
}
|