diff --git a/Part#2 - CPU/olc6502.cpp b/Part#2 - CPU/olc6502.cpp index d3db41c..6815ff1 100644 --- a/Part#2 - CPU/olc6502.cpp +++ b/Part#2 - CPU/olc6502.cpp @@ -1577,7 +1577,8 @@ std::map olc6502::disassemble(uint16_t nStart, uint16_t n else if (lookup[opcode].addrmode == &olc6502::REL) { value = bus->read(addr, true); addr++; - sInst += "$" + hex(value, 2) + " [$" + hex(addr + value, 4) + "] {REL}"; + int8_t rel_value = (int8_t)value; + sInst += "$" + hex(value, 2) + " [$" + hex(addr + rel_value, 4) + "] {REL}"; } // Add the formed string to a std::map, using the instruction's