added rsdt parse functionality

this function prints out the RSDT entries present in the system
This commit is contained in:
Michael Shaw 2023-02-27 22:55:06 -05:00
commit 2146b49bb3
6 changed files with 76 additions and 9 deletions

View file

@ -71,6 +71,18 @@ int printf(const char *restrict fmt, ...)
i = va_arg(args, int);
ret++;
printf_out(i);
break;
case 'x':
i = va_arg(args, int);
for (int j = sizeof(i) - 1; j >= 0; j--) {
printf_out(
convert[(i >> (j * 4)) & 0xF]);
ret++;
}
break;
default:
printf_out(c);
ret++;
}
} else {
printf_out(c);

18
lib/string.c Normal file
View file

@ -0,0 +1,18 @@
#include <string.h>
void *memcpy(void *dest, const void *src, size_t num)
{
char *d = (char *)dest;
char *s = (char *)src;
for (size_t i = 0; i < num; i++) {
*d++ = *s++;
}
return dest;
}
char *strcpy(char *dest, const char *src)
{
while ((*dest++ = *src++))
;
return dest;
}