This commit is contained in:
MonkeyGG2 2024-02-18 11:07:01 -05:00
commit b1b6ef6005
3 changed files with 17 additions and 0 deletions

View File

@ -22,6 +22,14 @@
#define START 0xb80f0 #define START 0xb80f0
#define SIZE 16384 #define SIZE 16384
/*
* How memory is mapped
*/
#define STACK_START 0x000b8fa0
#define STACK_END 0x000fffff
#define PR_START 0x00100000
#define PHYSMEMTOP 0x0e000000
struct allocated { struct allocated {
void *ref; void *ref;
s32 size; s32 size;

View File

@ -3,6 +3,13 @@
u32 curr = START; u32 curr = START;
void
memory_init(void)
{
u32 esp, ebp;
ebp = 0x8B7F0;
}
void *malloc(s32 size) { void *malloc(s32 size) {
u32 addr = curr; u32 addr = curr;
curr += size; curr += size;

View File

@ -53,6 +53,8 @@ sysinit(void)
printf("%s%x", "Omh", 0x2a); printf("%s%x", "Omh", 0x2a);
vga_write("Starting omOS...", 16, 0x0F); vga_write("Starting omOS...", 16, 0x0F);
memory_init();
s8 *start = (s8 *) 0xb8fa0; s8 *start = (s8 *) 0xb8fa0;
start[0] = 'h'; start[0] = 'h';
} }