Skip to content

Commit

Permalink
#8 Cast byte to sbyte for negative relative branch operand
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Oct 8, 2019
1 parent 7f9e51d commit ce8dc84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MicroProcessor/Cpu6502/OpCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public string ToString(bool showComments = false) {
break;

case Enums.AddressingMode.Relative:
s = $"{s} ${OpCodeAddress + Length + (Operands[0]):X2}";
s = $"{s} ${(OpCodeAddress + Length + ((sbyte) Operands[0])):X2}";
break;

case Enums.AddressingMode.Zeropage:
Expand Down

0 comments on commit ce8dc84

Please sign in to comment.