1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-24 14:38:05 +11:00

tools/emul: add hex representation to debug output

My mind isn't so good at decimal -> hex translations. It helps to have
this...
This commit is contained in:
Virgil Dupras 2019-06-03 11:16:06 -04:00
parent 082fa3431d
commit 7ae29015de
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ static void io_write(int unused, uint16_t addr, uint8_t val)
} else if (addr == FS_SEEKE_PORT) {
fsdev_ptr = (fsdev_ptr & 0x00ffff) | (val << 16);
} else {
fprintf(stderr, "Out of bounds I/O write: %d / %d\n", addr, val);
fprintf(stderr, "Out of bounds I/O write: %d / %d (0x%x)\n", addr, val, val);
}
}

View File

@ -140,7 +140,7 @@ static void io_write(int unused, uint16_t addr, uint8_t val)
} else if (addr == STDERR_PORT) {
fputc(val, stderr);
} else {
fprintf(stderr, "Out of bounds I/O write: %d / %d\n", addr, val);
fprintf(stderr, "Out of bounds I/O write: %d / %d (0x%x)\n", addr, val, val);
}
}