omos-tcnj2024/sys/lib.c

19 lines
225 B
C
Raw Normal View History

2024-02-18 13:38:08 +01:00
#include <types.h>
u32
strlen(const char *str)
{
size_t i;
2024-02-18 14:40:09 +01:00
for (i = 0; str[i] != NULL; i++);
2024-02-18 13:38:08 +01:00
return i;
}
2024-02-18 15:14:47 +01:00
printf(const char *format, ...)
{
const u32 len = strlen(format);
vga_write(format, len, 0x0f);
return len;
}