diff --git a/sys/include/memory.h b/sys/include/memory.h index 8bb51b2..b0c184a 100644 --- a/sys/include/memory.h +++ b/sys/include/memory.h @@ -28,6 +28,7 @@ #define STACK_START 0x000b8fa0 #define STACK_END 0x000fffff #define PR_START 0x00100000 +#define MALLOC_END 0x00100fff #define PHYSMEMTOP 0x0e000000 struct allocated { @@ -35,4 +36,6 @@ struct allocated { s32 size; } +void memory_init(void); + #endif diff --git a/sys/memory.c b/sys/memory.c index 3ad485e..8003d3b 100644 --- a/sys/memory.c +++ b/sys/memory.c @@ -7,7 +7,10 @@ void memory_init(void) { u32 esp, ebp; - ebp = 0x8B7F0; + ebp = STACK_START; + esp = STACK_START; + + } void *malloc(s32 size) { diff --git a/sys/sysinit.c b/sys/sysinit.c index 67b2d1c..f1c7b91 100644 --- a/sys/sysinit.c +++ b/sys/sysinit.c @@ -6,13 +6,10 @@ void sysinit(void) { char *howdy = "Om Smart."; - char *howday = "Om Smarter."; vga_clearscreen(); vga_write("Starting omOS...", 16, 0x0F); memory_init(); - s8 *start = (s8 *) 0xb8fa0; - start[0] = 'h'; }