From 30d45ae7d9dbd4aeebcfd2373b768f5aa189ee01 Mon Sep 17 00:00:00 2001 From: "Howard M. Harte" Date: Sat, 1 Apr 2023 07:01:16 -0700 Subject: [PATCH] AltairZ80: CPU: Properly reset PC. After adding the sim_clock_precalibrate_commands, the PC was not zero at the sim> prompt after loading altairz80. Set CPU_S to zero in cpu_reset to address this issue. --- AltairZ80/altairz80_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AltairZ80/altairz80_cpu.c b/AltairZ80/altairz80_cpu.c index 6a72b6de..5e52299b 100644 --- a/AltairZ80/altairz80_cpu.c +++ b/AltairZ80/altairz80_cpu.c @@ -6412,7 +6412,7 @@ static t_stat cpu_reset(DEVICE *dptr) { AF_S = AF1_S = 0; BC_S = DE_S = HL_S = 0; BC1_S = DE1_S = HL1_S = 0; - IR_S = IX_S = IY_S = SP_S = 0; + IR_S = IX_S = IY_S = SP_S = PC_S = 0; IM_S = IFF_S = 0; /* Set IM0, reset IFF1 and IFF2 */ setBankSelect(0); cpu8086reset();