Browse files

Fix up disassemble bug near 0x0000

  • Loading branch information...
1 parent c7a0838 commit d29ce482f108211c02cc93e20cefc7be81be9dc6 @mattgodbolt committed Jul 8, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 debug.js
View
7 debug.js
@@ -119,7 +119,10 @@ function showDebug(pc) {
}
function updateDebug(pcOrNone) {
- updateDisassembly(pcOrNone || disassPc);
+ if (pcOrNone == null) {
+ pcOrNone = disassPc;
+ }
+ updateDisassembly(pcOrNone);
for (var reg in z80) {
var elem = $('#z80_' + reg);
if (elem) {
@@ -155,7 +158,7 @@ function step() {
function isUnconditionalJump(addr) {
var result = disassemble(addr);
- if (result[0].match(/^(JR 0x|JP|RET)/)) {
+ if (result[0].match(/^(JR 0x|JP|RET|RST)/)) {
return true;
}
return false;

0 comments on commit d29ce48

Please sign in to comment.