From be6b0cf4299b5dd6b08048071d3a41749a4fceaf Mon Sep 17 00:00:00 2001 From: sBubshait Date: Mon, 3 Jun 2024 22:33:40 +0100 Subject: [PATCH] Fix Bug in Print.c to print Hex instead of decimal, w/ T --- src/print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/print.c b/src/print.c index c23f25b..1d1d4a2 100644 --- a/src/print.c +++ b/src/print.c @@ -17,9 +17,9 @@ void printState(Machine *state, FILE *stream) { void printRegisters(Machine *state, FILE *stream) { fprintf(stream, "Registers:\n"); for (int i = 0; i < REGISTER_COUNT; i++) { - fprintf(stream, "X%02d\t= %016" PRIu64 "\n", i, state->registers[i]); + fprintf(stream, "X%02d\t= %016" PRIx64 "\n", i, state->registers[i]); } - fprintf(stream, "PC\t= %016" PRIu64 "\n", state->pc); + fprintf(stream, "PC\t= %016" PRIx64 "\n", state->pc); fprintf(stream, "PSTATE\t: %c%c%c%c", state->conditionCodes.Negative ? 'N' : UNSET_CONDITION_CODE_CHAR, state->conditionCodes.Zero ? 'Z' : UNSET_CONDITION_CODE_CHAR, state->conditionCodes.Carry ? 'C' : UNSET_CONDITION_CODE_CHAR,