0.0.2d: Added BGA support, graphics!

This commit is contained in:
2026-06-05 16:14:14 -05:00
parent 5971218b56
commit f3b2f95af5
40 changed files with 1007 additions and 1197 deletions

View File

@ -1,7 +1,8 @@
#include <drivers/ps2_keyboard.h>
#include <types.h>
#include <stdlib.h>
#include <string.h>
#include <drivers/ps2_keyboard.h>
#include <kernel/syscall.h>
#include <tty.h>
@ -13,7 +14,7 @@ int write(uint32_t fd, void* data, size_t len)
{
if (fd == STDOUT)
{
print_uint((uint32_t) len);
/*print_uint((uint32_t) len);*/
terminal_write((char*) data, len);
}
else
@ -30,8 +31,14 @@ int read(uint32_t fd, void* data, size_t max_len)
if (fd == STDIN)
{
char* sptr = (char*) data; /* this really shouldn't be needed... */
sptr = gets_new(&rv);
char* rd = gets_new(&rv);
size_t sz = strlen(rd);
memcpy(data, rd, (sz < max_len) ? sz : max_len);
if (!rd)
{
printf("rd is NULL!\n");
}
}
else
{
@ -45,12 +52,7 @@ extern bool ps2keyboard_initialized;
char getchar(void)
{
if (ps2keyboard_initialized)
{
return get_char();
}
return '\0';
return tty_get_char();
}
char* getstring(void)
@ -92,6 +94,8 @@ int getstr(char* dest)
}
strcpy(dest, p);
return 0;
}
void putc(char c)