1 |
|
/* |
2 |
< |
* mon_cmd.cpp - mon standard commands |
2 |
> |
* mon_cmd.cpp - cxmon standard commands |
3 |
|
* |
4 |
< |
* mon (C) 1997-1999 Christian Bauer, Marc Hellwig |
4 |
> |
* cxmon (C) 1997-1999 Christian Bauer, Marc Hellwig |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
298 |
|
* d68 [start [end]] |
299 |
|
* d80 [start [end]] |
300 |
|
* d86 [start [end]] |
301 |
+ |
* d8086 [start [end]] |
302 |
|
*/ |
303 |
|
|
304 |
|
enum CPUType { |
305 |
|
CPU_PPC, |
306 |
|
CPU_6502, |
307 |
|
CPU_680x0, |
308 |
< |
CPU_8080, |
309 |
< |
CPU_80x86 |
308 |
> |
CPU_Z80, |
309 |
> |
CPU_80x86_32, |
310 |
> |
CPU_80x86_16 |
311 |
|
}; |
312 |
|
|
313 |
|
static void disassemble(CPUType type) |
344 |
|
} |
345 |
|
break; |
346 |
|
|
347 |
< |
case CPU_8080: |
347 |
> |
case CPU_Z80: |
348 |
|
while (adr <= end_adr && !mon_aborted()) { |
347 |
– |
uint8 op = mon_read_byte(adr); |
348 |
– |
uint8 lo = mon_read_byte(adr + 1); |
349 |
– |
uint8 hi = mon_read_byte(adr + 2); |
349 |
|
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
350 |
< |
adr += disass_8080(monout, mon_use_real_mem ? adr : adr % mon_mem_size, op, lo, hi); |
350 |
> |
adr += disass_z80(monout, mon_use_real_mem ? adr : adr % mon_mem_size); |
351 |
|
} |
352 |
|
break; |
353 |
|
|
354 |
< |
case CPU_80x86: |
354 |
> |
case CPU_80x86_32: |
355 |
|
while (adr <= end_adr && !mon_aborted()) { |
356 |
|
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
357 |
< |
adr += disass_x86(monout, mon_use_real_mem ? adr : adr % mon_mem_size); |
357 |
> |
adr += disass_x86(monout, mon_use_real_mem ? adr : adr % mon_mem_size, false); |
358 |
> |
} |
359 |
> |
break; |
360 |
> |
|
361 |
> |
case CPU_80x86_16: |
362 |
> |
while (adr <= end_adr && !mon_aborted()) { |
363 |
> |
fprintf(monout, "%08x: ", mon_use_real_mem ? adr : adr % mon_mem_size); |
364 |
> |
adr += disass_x86(monout, mon_use_real_mem ? adr : adr % mon_mem_size, true); |
365 |
|
} |
366 |
|
break; |
367 |
|
} |
384 |
|
disassemble(CPU_680x0); |
385 |
|
} |
386 |
|
|
387 |
< |
void disassemble_8080(void) |
387 |
> |
void disassemble_z80(void) |
388 |
> |
{ |
389 |
> |
disassemble(CPU_Z80); |
390 |
> |
} |
391 |
> |
|
392 |
> |
void disassemble_80x86_32(void) |
393 |
|
{ |
394 |
< |
disassemble(CPU_8080); |
394 |
> |
disassemble(CPU_80x86_32); |
395 |
|
} |
396 |
|
|
397 |
< |
void disassemble_80x86(void) |
397 |
> |
void disassemble_80x86_16(void) |
398 |
|
{ |
399 |
< |
disassemble(CPU_80x86); |
399 |
> |
disassemble(CPU_80x86_16); |
400 |
|
} |
401 |
|
|
402 |
|
|