comparison dis.c @ 48:0bdda50c7364

Don't try to disassemble addresses beyond the end of the cartridge
author Mike Pavone <pavone@retrodev.com>
date Wed, 12 Dec 2012 21:25:31 -0800
parents 4b6c667326a1
children 7b1e16e981ef
comparison
equal deleted inserted replaced
47:4b6c667326a1 48:0bdda50c7364
74 } while(def && encoded == NULL); 74 } while(def && encoded == NULL);
75 if (!encoded) { 75 if (!encoded) {
76 break; 76 break;
77 } 77 }
78 for(;;) { 78 for(;;) {
79 if (address > filesize) {
80 break;
81 }
79 visit(address); 82 visit(address);
80 next = m68k_decode(encoded, &instbuf, address); 83 next = m68k_decode(encoded, &instbuf, address);
81 address += (next-encoded)*2; 84 address += (next-encoded)*2;
82 encoded = next; 85 encoded = next;
83 m68k_disasm(&instbuf, disbuf); 86 m68k_disasm(&instbuf, disbuf);