ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/src/mon.cpp
(Generate patch)

Comparing mon/src/mon.cpp (file contents):
Revision 1.18 by gbeauche, 2002-07-17T10:00:54Z vs.
Revision 1.22 by cebix, 2003-09-27T20:33:06Z

# Line 1 | Line 1
1   /*
2   *  mon.cpp - cxmon main program
3   *
4 < *  cxmon (C) 1997-2002 Christian Bauer, Marc Hellwig
4 > *  cxmon (C) 1997-2003 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
# Line 52 | Line 52 | extern "C" {
52   #include "mon_lowmem.h"
53  
54   #ifndef VERSION
55 < #define VERSION "2"
55 > #define VERSION "3"
56   #endif
57  
58  
# Line 267 | Line 267 | static void read_line(char *prompt)
267  
268          line_read = readline(prompt);
269  
270 <        if (line_read && *line_read)
271 <                add_history(line_read);
270 >        if (line_read) {
271 >
272 >                if (*line_read)
273 >                        add_history(line_read);
274 >
275 >                strncpy(in_ptr = input, line_read, INPUT_LENGTH);
276 >                input[INPUT_LENGTH-1] = 0;
277  
278 <        strncpy(in_ptr = input, line_read, INPUT_LENGTH);
279 <        input[INPUT_LENGTH-1] = 0;
278 >        } else {
279 >
280 >                // EOF, quit cxmon
281 >                fprintf(monout, "x\n");
282 >                input[0] = 'x';
283 >                input[1] = 0;
284 >                in_ptr = input;
285 >        }
286   #else
287          fprintf(monout, prompt);
288          fflush(monout);
# Line 1017 | Line 1028 | void mon_init(void)
1028          mon_add_command("d80", disassemble_z80,                 "d80 [start [end]]        Disassemble Z80 code\n");
1029          mon_add_command("d86", disassemble_80x86_32,    "d86 [start [end]]        Disassemble 80x86 (32-bit) code\n");
1030          mon_add_command("d8086", disassemble_80x86_16,  "d8086 [start [end]]      Disassemble 80x86 (16-bit) code\n");
1031 +        mon_add_command("d8664", disassemble_x86_64,    "d8664 [start [end]]      Disassemble x86-64 code\n");
1032          mon_add_command(":", modify,                                    ": start string           Modify memory\n");
1033          mon_add_command("f", fill,                                              "f start end string       Fill memory\n");
1034          mon_add_command("y", apply_byte,                                "y[b|h|w] start end expr  Apply expression to memory\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines