Massive backlog of changes

This commit is contained in:
2022-06-15 15:59:31 -05:00
parent c962a83ff0
commit a52f06f81e
49 changed files with 1855 additions and 1083 deletions

View File

@@ -1,7 +1,5 @@
#include "stdio.h"
#include "platform/putc.h"
#include "mmgr.h"
#include "allocator.h"
#include <stddef.h>
enum vga_color_t {
VGA_COLOR_BLACK = 0,
@@ -30,17 +28,17 @@ struct cell_t
char bg : 4;
};
struct cell_t *screen = (struct cell_t*)NULL;
size_t cursor = 0;
unsigned int cursor = 0;
const size_t tab_width = 4;
const size_t line_width = 80;
const size_t line_count = 25;
const unsigned int tab_width = 4;
const unsigned int line_width = 80;
const unsigned int line_count = 25;
struct cell_t screen[4096 / sizeof(struct cell_t)] __attribute__ ((aligned (4096)));
int initialize_screen()
{
screen = allocate_from_bottom(page_size);
map_page(NULL, screen, 0x000B8000, PAGE_RW);
return map_page(screen, 0x000B8000, PAGE_RW);
}
int putchar(int c)