memory thing

This commit is contained in:
spikey 2024-02-18 11:14:38 -05:00
parent bbf6441108
commit 0892eb841c
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -7,7 +7,10 @@ void
memory_init(void)
{
u32 esp, ebp;
ebp = 0x8B7F0;
ebp = STACK_START;
esp = STACK_START;
}
void *malloc(s32 size) {

View File

@ -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';
}