Trying to fix issue #1354: Program memory width is 16 bit, JMP/CALL addresses should be converted to 8 bit memory width when disassembling.

This commit is contained in:
Torben Nielsen 2014-09-16 12:05:33 +02:00 committed by pancake
parent 90dad36646
commit c9ea8bc718

View File

@ -78,8 +78,11 @@ int disassembleInstruction(disassembledInstruction *dInstruction, const assemble
* so in order to jump/call to the right address (which increments by
* two for every instruction), we must multiply this distance by two. */
//printf ("ii=%d\n", insidx);
if (insidx==86)
if(!strcmp(longInstruction.instruction->mnemonic,"call")||
!strcmp(longInstruction.instruction->mnemonic,"jmp"))
{
AVR_Long_Address *= 2;
}
*dInstruction = longInstruction;
return 0;
/* If a long instruction was printed in the last instruction disassembly,