kernel_premier/kmain.c
2023-09-13 16:31:15 +02:00

33 lines
482 B
C

#include "framebuffer.h"
unsigned int write(char *buf, unsigned int len)
{
unsigned int ret = 0;
int pos = 0;
fb_move_cursor(ret);
while (ret < len)
{
fb_write_cell(pos, *(buf + ret), FB_WHITE, FB_BLACK);
ret++;
fb_move_cursor(ret);
pos += 2;
}
return ret;
}
int strlen(char *buf)
{
int ret = 0;
while (*(buf + ret) != '\0') ret++;
return ret;
}
void kmain(void)
{
char *str = "pouet pouet";
int len = strlen(str);
write(str, len);
}