From de1ab25427d3ca8c0c4a50fd8104896d46e7075d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Wed, 15 Feb 2017 21:38:51 +0100 Subject: [PATCH] Make runtime disassembly optional. --- src/rk65c02.c | 5 +++-- src/rk65c02.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rk65c02.c b/src/rk65c02.c index 4960e43..2a766a8 100644 --- a/src/rk65c02.c +++ b/src/rk65c02.c @@ -32,6 +32,7 @@ rk65c02_init(bus_t *b) e.bps_head = NULL; e.trace_head = NULL; + e.runtime_disassembly = false; return e; } @@ -103,8 +104,8 @@ rk65c02_exec(rk65c02emu_t *e) return; } - /* if disassembly-when-running enabled */ - disassemble(e->bus, e->regs.PC); + if (e->runtime_disassembly) + disassemble(e->bus, e->regs.PC); i = instruction_fetch(e->bus, e->regs.PC); id = instruction_decode(i.opcode); diff --git a/src/rk65c02.h b/src/rk65c02.h index d5b4479..53df0ec 100644 --- a/src/rk65c02.h +++ b/src/rk65c02.h @@ -69,7 +69,7 @@ struct rk65c02emu { bool irq; /* interrupt request line state, true is asserted */ breakpoint_t *bps_head; /* pointer to linked list with breakpoints */ - + bool runtime_disassembly; /* disassemble code when emulator is running */ bool trace; /* tracing mode enable/disable */ trace_t *trace_head; /* pointer to linked list with trace log */ };