-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel.c
46 lines (39 loc) · 977 Bytes
/
kernel.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "../cpu/headers/isr.h"
#include "../drivers/headers/screen.h"
#include "headers/kernel.h"
#include "../libc/headers/string.h"
#include "../libc/headers/mem.h"
#include "headers/commands.h"
#include <stdint.h>
void kernel_main() {
isr_install();
irq_install();
asm("int $2");
asm("int $3");
kprint("\n");
kprint("Buenos dias");
kprint("\n");
help();
kprint("\n");
terminal();
}
void user_input(char *input) {
if (strcmp(input, "POWEROFF") == 0) {
poweroff();
} else if (strcmp(input, "STACK") == 0) {
print_stack();
} else if (strcmp(input, "REBOOT") == 0) {
reboot();
} else if (strcmp(input, "HELP") == 0) {
help();
} else if (strcmp(input, "HALT") == 0) {
halt();
} else if (strcmp(input, "MEM") == 0) {
mem();
} else {
kprint("No te entiendo, has dicho ");
kprint(input);
kprint("\n");
}
terminal();
}