diff options
author | Michael Pavone <pavone@retrodev.com> | 2015-07-25 18:22:07 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2015-07-25 18:22:07 -0700 |
commit | 80ff833dd8ad011b579bff26ac654819e6735bce (patch) | |
tree | 14f667ebb4739fd60780890884b98ce43e6b2e74 /m68k_core_x86.c | |
parent | 7406c8bf64624feff0bf982e4667a194d31f8484 (diff) |
Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
Diffstat (limited to 'm68k_core_x86.c')
-rw-r--r-- | m68k_core_x86.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/m68k_core_x86.c b/m68k_core_x86.c index 5429bfd..c0b527c 100644 --- a/m68k_core_x86.c +++ b/m68k_core_x86.c @@ -9,6 +9,7 @@ #include "68kinst.h" #include "mem.h" #include "backend.h" +#include "util.h" #include <stdio.h> #include <stddef.h> #include <stdlib.h> @@ -507,8 +508,7 @@ void translate_m68k_op(m68kinst * inst, host_ea * ea, m68k_options * opts, uint8 return; default: m68k_disasm(inst, disasm_buf); - printf("%X: %s\naddress mode %d not implemented (%s)\n", inst->address, disasm_buf, op->addr_mode, dst ? "dst" : "src"); - exit(1); + fatal_error("%X: %s\naddress mode %d not implemented (%s)\n", inst->address, disasm_buf, op->addr_mode, dst ? "dst" : "src"); } if (!dst && inst->dst.addr_mode == MODE_AREG && inst->extra.size == OPSIZE_WORD) { if (ea->mode == MODE_REG_DIRECT) { @@ -684,8 +684,7 @@ void translate_m68k_move(m68k_options * opts, m68kinst * inst) break; default: m68k_disasm(inst, disasm_buf); - printf("%X: %s\naddress mode %d not implemented (move dst)\n", inst->address, disasm_buf, inst->dst.addr_mode); - exit(1); + fatal_error("%X: %s\naddress mode %d not implemented (move dst)\n", inst->address, disasm_buf, inst->dst.addr_mode); } if (inst->dst.addr_mode != MODE_AREG) { |