printf thing

This commit is contained in:
MonkeyGG2 2024-02-18 09:14:47 -05:00
parent 2374905355
commit 31d90032c7
2 changed files with 15 additions and 19 deletions

View File

@ -9,3 +9,11 @@ strlen(const char *str)
return i; return i;
} }
printf(const char *format, ...)
{
const u32 len = strlen(format);
vga_write(format, len, 0x0f);
return len;
}

View File

@ -1,22 +1,10 @@
#include <memory.h> #include <memory.h>
#include <types.h>
void * u32 curr = START;
malloc(s32 size)
{
s32 actual_size = size + sizeof(s32) + sizeof(void *);
if (start == NULL) { void *malloc(s32 size) {
start = (void *) START; u32 addr = curr;
curr += size;
start[0] = '\0'; return (void*)addr;
start[1] = '\0';
start[2] = '\0';
start[3] = '\0';
SIZE(m) = size;
return USABLE(m);
}
/* TODO */
} }