Correct target address for 6501 conditional jumps
It was calculated wrong if the offset was negative.
This commit is contained in:
parent
8c69479f8c
commit
2655a372b8
|
@ -616,7 +616,7 @@ static void disassemble(char *output, uint8_t *buffer, options_t *options, uint1
|
|||
|
||||
// Compute displacement from first byte after full instruction.
|
||||
word_operand = current_addr + 3;
|
||||
if (byte_operand > 0x7Fu) {
|
||||
if (byte_operand2 > 0x7Fu) {
|
||||
word_operand -= ((~byte_operand2 & 0x7Fu) + 1);
|
||||
} else {
|
||||
word_operand += byte_operand2 & 0x7Fu;
|
||||
|
|
Loading…
Reference in New Issue