From 047beb0e3e58e57cfcaf6361f89e4fc0941d9467 Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Mon, 25 Apr 2022 17:44:02 -0400 Subject: [PATCH] KA10: Fix second interrupt instruction on KA10. --- PDP10/kx10_cpu.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/PDP10/kx10_cpu.c b/PDP10/kx10_cpu.c index cdac790..99546b6 100644 --- a/PDP10/kx10_cpu.c +++ b/PDP10/kx10_cpu.c @@ -843,10 +843,10 @@ void set_interrupt(int dev, int lvl) { if (lvl) { dev_irq[dev>>2] = 0200 >> lvl; pi_pending = 1; -//#if DEBUG +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "set irq %o %o %03o %03o %03o\n", dev & 0774, lvl, PIE, PIR, PIH); -//#endif +#endif } } @@ -871,10 +871,10 @@ void set_interrupt_mpx(int dev, int lvl, int mpx) { */ void clr_interrupt(int dev) { dev_irq[dev>>2] = 0; -//#if DEBUG +#if DEBUG if (dev > 4) sim_debug(DEBUG_IRQ, &cpu_dev, "clear irq %o\n", dev & 0774); -//#endif +#endif } /* @@ -955,9 +955,9 @@ void restore_pi_hold() { for(lvl = 0100; lvl != 0; lvl >>= 1) { if (lvl & PIH) { PIR &= ~lvl; -//#if DEBUG +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "restore irq %o %03o\n", lvl, PIH); -//#endif +#endif PIH &= ~lvl; #if KS_ITS pi_act &= ~lvl; @@ -4646,10 +4646,10 @@ in_loop: #if KA | PDP6 st_pi: #endif -//#if DEBUG +#if DEBUG sim_debug(DEBUG_IRQ, &cpu_dev, "trap irq %o %03o %03o \n", pi_enc, PIR, PIH); -//#endif +#endif pi_cycle = 1; pi_rq = 0; pi_hold = 0; @@ -4704,6 +4704,7 @@ st_pi: Mem_read_nopage(); goto no_fetch; #elif PDP6 | KA + pi_vect = AB; goto fetch; #endif }