summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/monitor.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/monitor.c b/source/monitor.c
index 14df3bb..6f0fa05 100644
--- a/source/monitor.c
+++ b/source/monitor.c
@@ -107,7 +107,7 @@ static void DisplayRunningState(int running)
}
-static void DisplayCPU(Z80 *cpu)
+static void DisplayCPU(Z80 *cpu, int stepped)
{
static const char *flag_char = "SZ5H3PNC";
static Z80Word prev_pc[8];
@@ -127,7 +127,7 @@ static void DisplayCPU(Z80 *cpu)
TM_printf(1,f,"%4.4x:",tmp);
TM_Put(7,f,Z80Disassemble(cpu,&tmp));
- if (f)
+ if (stepped && f)
{
prev_pc[f-1] = prev_pc[f];
}
@@ -238,6 +238,7 @@ void MachineCodeMonitor(Z80 *cpu)
int done = FALSE;
int running = FALSE;
int cpu_display = TRUE;
+ int stepped = FALSE;
int key;
SoftKey soft_key;
@@ -256,13 +257,15 @@ void MachineCodeMonitor(Z80 *cpu)
if (cpu_display)
{
- DisplayCPU(cpu);
+ DisplayCPU(cpu,stepped);
}
else
{
DisplayMem(cpu,mem_display,display_address);
}
+ stepped = FALSE;
+
do
{
SoftKeyEvent ev;
@@ -330,6 +333,7 @@ void MachineCodeMonitor(Z80 *cpu)
if (running || (key & KEY_A))
{
Z80SingleStep(cpu);
+ stepped = TRUE;
}
}