Browse Source

tools/emul: add hex representation to debug output

My mind isn't so good at decimal -> hex translations. It helps to have
this...
pull/10/head
Virgil Dupras 5 years ago
parent
commit
7ae29015de
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      tools/emul/shell/shell.c
  2. +1
    -1
      tools/emul/zasm/zasm.c

+ 1
- 1
tools/emul/shell/shell.c 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);
}
}



+ 1
- 1
tools/emul/zasm/zasm.c 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);
}
}



Loading…
Cancel
Save