--- mon/src/mon_cmd.cpp 1999/10/04 19:31:09 1.1 +++ mon/src/mon_cmd.cpp 1999/10/05 14:43:46 1.3 @@ -1,12 +1,24 @@ /* * mon_cmd.cpp - mon standard commands * - * (C) 1997-1999 Christian Bauer + * mon (C) 1997-1999 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include +#include "sysdeps.h" #include "mon.h" #include "mon_cmd.h" @@ -15,6 +27,7 @@ #include "mon_x86.h" #include "mon_6502.h" #include "mon_8080.h" +#include "version.h" /* @@ -104,7 +117,7 @@ static inline uint8 char2print(uint8 c) void version(void) { - fprintf(monout, "mon V%d.%d\n", MON_VERSION, MON_REVISION); + fprintf(monout, "mon V%d.%d\n", VERSION_MAJOR, VERSION_MINOR); } @@ -157,14 +170,14 @@ void print_expr(void) } if (val > 0x7fffffff) { - fprintf(monout, "Hex unsigned: $%08lx\n" - "Hex signed : -$%08lx\n" - "Dec unsigned: %lu\n" - "Dec signed : %ld\n", val, -val, val, val); + fprintf(monout, "Hex unsigned: $%08x\n" + "Hex signed : -$%08x\n" + "Dec unsigned: %u\n" + "Dec signed : %d\n", val, -val, val, val); fprintf(monout, "Char : '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); } else { - fprintf(monout, "Hex : $%08lx\n" - "Dec : %ld\n", val, val); + fprintf(monout, "Hex : $%08x\n" + "Dec : %d\n", val, val); fprintf(monout, "Char: '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); } } @@ -208,10 +221,10 @@ void memory_dump(void) return; while (adr <= end_adr && !mon_aborted()) { - fprintf(monout, "%08lx:", mon_use_real_mem ? adr: adr % mon_mem_size); + fprintf(monout, "%08x:", mon_use_real_mem ? adr: adr % mon_mem_size); for (int i=0; i