added rsdt parse functionality
this function prints out the RSDT entries present in the system
This commit is contained in:
parent
0cc86fc37d
commit
2146b49bb3
6 changed files with 76 additions and 9 deletions
12
lib/printf.c
12
lib/printf.c
|
|
@ -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
18
lib/string.c
Normal 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;
|
||||
}
|
||||
Loading…
Reference in a new issue