--- mon/src/mon_cmd.cpp 2000/06/10 19:07:37 1.6 +++ mon/src/mon_cmd.cpp 2002/07/17 10:00:54 1.11 @@ -1,7 +1,7 @@ /* - * mon_cmd.cpp - mon standard commands + * mon_cmd.cpp - cxmon standard commands * - * mon (C) 1997-1999 Christian Bauer, Marc Hellwig + * cxmon (C) 1997-2002 Christian Bauer, Marc Hellwig * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,11 +24,7 @@ #include "mon.h" #include "mon_cmd.h" -#include "mon_ppc.h" -#include "mon_68k.h" -#include "mon_x86.h" -#include "mon_6502.h" -#include "mon_8080.h" +#include "mon_disass.h" #ifndef VERSION #define VERSION "2" @@ -44,7 +40,7 @@ * true: OK, false: Error */ -static bool range_args(uint32 *adr, uint32 *end_adr, uint32 def_range) +static bool range_args(uintptr *adr, uintptr *end_adr, uint32 def_range) { *adr = mon_dot_address; *end_adr = mon_dot_address + def_range; @@ -71,9 +67,9 @@ static bool range_args(uint32 *adr, uint * byte_string = (expression | STRING) {COMMA (expression | STRING)} END */ -static bool byte_string(uint8 *s, uint32 &len) +static bool byte_string(uint8 *s, uintptr &len) { - uint32 value; + uintptr value; len = 0; goto start; @@ -165,7 +161,7 @@ void redir_output(void) void print_expr(void) { - uint32 val; + uintptr val; if (!mon_expression(&val)) return; @@ -217,7 +213,7 @@ void shell_command(void) void memory_dump(void) { - uint32 adr, end_adr; + uintptr adr, end_adr; uint8 mem[MEMDUMP_BPL + 1]; mem[MEMDUMP_BPL] = 0; @@ -226,7 +222,7 @@ void memory_dump(void) return; while (adr <= end_adr && !mon_aborted()) { - fprintf(monout, "%08x:", mon_use_real_mem ? adr: adr % mon_mem_size); + fprintf(monout, "%0*lx:", 2 * sizeof(adr), mon_use_real_mem ? adr: adr % mon_mem_size); for (int i=0; i