fixed bug in branch, jumps are not counting the instr. amount, not
the address difference
displaying of branch and add changed/fixed
if(m_d) op << 'D';
if(m_c) op << 'C';
- op << " r" << m_rd << ", r" << m_ra << ", r" << m_rb;
+ op << this->getConditionFlag() << " r" << m_rd << ", r" << m_ra << ", r" << m_rb;
return op.str();
}
this->m_cpu->setRAM(sp, this->m_cpu->getNextPC());
this->m_cpu->setStack(sp);
}
+ /* fall through */
case 0:
- this->m_cpu->setNextPC(pc+this->m_imm);
+ this->m_cpu->setNextPC(pc+(this->m_imm*4));
break;
case 2:
case 3:
op << this->getConditionFlag() << (m_taken ? '+' : '-');
if(m_typ < 2) {
- op << " 0x" << std::hex << m_imm << "(" << std::dec << m_imm << ")";
+ op << " 0x" << std::hex << m_imm << "(" << std::dec << m_imm << ", " << (int) m_imm << ")";
}
return op.str();
}