267 |
|
|
268 |
|
line_read = readline(prompt); |
269 |
|
|
270 |
< |
if (line_read && *line_read) |
271 |
< |
add_history(line_read); |
270 |
> |
if (line_read) { |
271 |
|
|
272 |
< |
strncpy(in_ptr = input, line_read, INPUT_LENGTH); |
273 |
< |
input[INPUT_LENGTH-1] = 0; |
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 |
> |
} 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); |
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"); |