aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/system.c
diff options
context:
space:
mode:
authorMarvin Borner2020-04-29 19:21:29 +0200
committerMarvin Borner2020-04-29 19:21:29 +0200
commit4546c75d685475d8b9f215b588364e1d1bbd0b79 (patch)
tree2077f72ad46dfe877f7febdd0692edc139fd7937 /src/kernel/system.c
parent396d7d303d3bf0e796d0c817883ec1dec928352a (diff)
MUCH work in libc
Also cleaned up some syscalls etc
Diffstat (limited to 'src/kernel/system.c')
-rw-r--r--src/kernel/system.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/kernel/system.c b/src/kernel/system.c
index 6d5afca..37c81c4 100644
--- a/src/kernel/system.c
+++ b/src/kernel/system.c
@@ -7,37 +7,6 @@
#include <kernel/lib/stdio.h>
#include <stdarg.h>
-char *vga_buffer = (char *)0x500;
-
-void vga_clear()
-{
- uint16_t *terminal_buffer = (uint16_t *)0xB8000;
- for (size_t y = 0; y < 25; y++)
- for (size_t x = 0; x < 80; x++)
- terminal_buffer[y * 80 + x] = 0 | (uint16_t)0x700;
-}
-
-static int line = 0;
-
-void vga_log(char *msg)
-{
- if (line == 0)
- vga_clear();
- uint16_t *terminal_buffer = (uint16_t *)0xB8000;
- for (size_t i = 0; i < strlen(msg); i++)
- terminal_buffer[line * 80 + i] = (uint16_t)msg[i] | (uint16_t)0x700;
- info("%s", msg);
- char string[80];
- strcpy(string, "[");
- strcat(string, itoa((int)get_time()));
- strcat(string, "] ");
- strcat(string, "INF: ");
- strcat(string, msg);
- strcat(string, "\n");
- strcat(vga_buffer, string);
- line++;
-}
-
void _debug(const char *f, const char *fmt, ...)
{
serial_printf(MAG "[%s] " RES, f);
@@ -119,7 +88,7 @@ loop:
void v86(uint8_t code, regs16_t *regs)
{
- /* paging_disable(); */
+ paging_disable();
int32(code, regs);
- /* paging_enable(); */
+ paging_enable();
} \ No newline at end of file