Fixed ‘call’ instruction not being properly symbolicated. Closes #37

This commit is contained in:
Lior Halphon 2018-03-01 21:12:37 +02:00
parent fb03479a1f
commit 94c6dbd281

View File

@ -503,7 +503,7 @@ static void call_a16(GB_gameboy_t *gb, uint8_t opcode, uint16_t *pc)
{ {
(*pc)++; (*pc)++;
uint16_t addr = GB_read_memory(gb, *pc) | (GB_read_memory(gb, *pc + 1) << 8); uint16_t addr = GB_read_memory(gb, *pc) | (GB_read_memory(gb, *pc + 1) << 8);
const char *symbol = GB_debugger_name_for_address(gb, 0xff00 + addr); const char *symbol = GB_debugger_name_for_address(gb, addr);
if (symbol) { if (symbol) {
GB_log(gb, "CALL %s ; =$%04x\n", symbol, addr); GB_log(gb, "CALL %s ; =$%04x\n", symbol, addr);
} }