1
0
mirror of https://gitlab.com/80486DX2-66/gists synced 2025-04-04 20:25:22 +05:30

reverse-ramdisk.c: improve readability and optimize

This commit is contained in:
パチュリー・ノーレッジ 2024-07-30 17:46:22 +03:00
parent 61bc7a0725
commit 57c368e6c9
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -353,10 +353,12 @@ int tf_read(int ID, size_t offset, void* dest, size_t data_size) {
#ifdef DEBUG
printf("Read: ID = %d, src = %p, size = %zu -> '",
ID, dest, data_size);
for (size_t i = 0; i < data_size; i++)
printf("0x%02" PRIX8 "%c", *((uint8_t*)((uint8_t*)dest + i)),
i == (data_size - 1) ? '\'' : ' ');
printf("\n");
for (size_t i = 0; i < data_size; i++) {
if (i > 0)
putc(' ', stdout);
printf("0x%02" PRIX8, *((uint8_t*)((uint8_t*)dest + i)));
}
printf("'\n");
fflush(stdout);
#endif