mem: add page entry type
This commit is contained in:
parent
01a2dde3cb
commit
2b9d76d015
7 changed files with 100 additions and 9 deletions
10
lib/printf.c
10
lib/printf.c
|
|
@ -26,6 +26,7 @@ int printf(const char *restrict fmt, ...)
|
|||
char c;
|
||||
char *s;
|
||||
int i;
|
||||
long l;
|
||||
|
||||
int n;
|
||||
|
||||
|
|
@ -82,6 +83,15 @@ int printf(const char *restrict fmt, ...)
|
|||
ret++;
|
||||
}
|
||||
break;
|
||||
case 'X':
|
||||
l = va_arg(args, long);
|
||||
for (uint64_t j = 0; j < (2 * sizeof(l)); j++) {
|
||||
int sel = ((sizeof(l) * 2) - j - 1) * 4;
|
||||
int num = (l >> sel) & 0xF;
|
||||
printf_out(convert[num]);
|
||||
ret++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printf_out(c);
|
||||
ret++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue