some work with PCI, updated my TODO

This commit is contained in:
2025-06-09 17:02:46 -04:00
parent a776376403
commit f1515ad7b5
7 changed files with 63 additions and 31 deletions

View File

@ -161,6 +161,17 @@ int printf(const char* restrict format, ...) {
if (!print(buffer, len))
return -1;
written += len;
} else if (*format == 'b') {
format++;
uint32_t i = (uint32_t) va_arg(parameters, uint32_t);
u32toa(i, buffer, 2);
size_t len = strlen(buffer);
if (maxrem < len) {
return -1;
}
if (!print(buffer, len))
return -1;
written += len;
} else {
format = format_begun_at;
size_t len = strlen(format);

View File

@ -13,6 +13,10 @@ int putchar(int ic) {
terminal_write(&c, sizeof(c));
#ifdef __TESTING__
serial_write(&c, sizeof(c));
if (c == '\n') {
char tmp = '\r';
serial_write(&tmp, sizeof(tmp));
}
#endif
#else
// TODO: Implement stdio and the write system call.