diff --git a/disassembler/x65dsasm.cpp b/disassembler/x65dsasm.cpp index 3b8f69d..9796907 100644 --- a/disassembler/x65dsasm.cpp +++ b/disassembler/x65dsasm.cpp @@ -1149,7 +1149,7 @@ void GetReferences(unsigned char *mem, size_t bytes, bool acc_16, bool ind_16, i reference = (unsigned short)mem[0] + ((unsigned short)mem[1]<<8); if (op == 0x20 || op == 0xfc || op == 0x22) // jsr opcodes type = RT_JSR; - else if (op == 0x4c || op == 0x6c || op == 0x7c || op == 0x5c || op == 0xdc) // jmp opcodes + else if (op == 0x4c || op == 0x7c || op == 0x5c || op == 0xdc) // jmp opcodes type = RT_JUMP; else type = RT_DATA; @@ -1276,7 +1276,7 @@ void GetReferences(unsigned char *mem, size_t bytes, bool acc_16, bool ind_16, i was_data = refs[curr_label].data==DT_DATA; } else { bool prev_data = was_data; - was_data = separator && !(!was_data && ((op==0x4c || op==0x6c) && (prev_op==0x4c || prev_op==0x6c))); + was_data = separator && !(!was_data && op==0x4c && prev_op==0x4c); if (!prev_data) { for (size_t j = 0; j &pRefs = *refs[i].pRefs; - for (size_t j = 0; jcurr) { - separator = false; - break; - } + bool exit_instr = false; + int lbl = GetLabelIndex(addr); + if (lbl>=0) { + std::vector &links = *refs[lbl].pRefs; + for (std::vector::iterator lnk = links.begin(); lnk!=links.end(); ++lnk) { + if (lnk->type == RT_BRANCH && lnk->instr_addr