[refactor] Organize INT

This commit is contained in:
2026-06-05 18:29:11 +08:00
Unverified
parent 7c66610c13
commit da03b301fb
17 changed files with 79 additions and 59 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
#include <serial.h>
#include <common.h>
extern EFI_SYSTEM_TABLE *ST;
@@ -34,7 +35,7 @@ void serial_write(const char *str) {
void serial_write_hex(UINTN val) {
char buf[19];
buf[0] = '0'; buf[1] = 'x';
for (int i = 17; i >= 2; i--) {
for (SSINT32 i = 17; i >= 2; i--) {
UINTN digit = val & 0xF;
buf[i] = digit < 10 ? '0' + digit : 'A' + digit - 10;
val >>= 4;