--- ../simhv33-2/HP2100/hp2100_cpu.c	2005-01-18 20:05:40.000000000 -0600
+++ hp2100_cpu.c	2005-04-07 13:02:51.480472056 -0500
@@ -654,6 +654,30 @@
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL  };
 
+char binformat[] = "-|---|---|---|---|---";
+
+#ifdef BLINKENLIGHTS
+void binprint(uint16 bin) {
+  binformat[0] = (bin & 0x8000) ? '*' : ' ';
+  binformat[2] = (bin & 0x4000) ? '*' : ' ';
+  binformat[3] = (bin & 0x2000) ? '*' : ' ';
+  binformat[4] = (bin & 0x1000) ? '*' : ' ';
+  binformat[6] = (bin & 0x0800) ? '*' : ' ';
+  binformat[7] = (bin & 0x0400) ? '*' : ' ';
+  binformat[8] = (bin & 0x0200) ? '*' : ' ';
+  binformat[10] = (bin & 0x0100) ? '*' : ' ';
+  binformat[11] = (bin & 0x0080) ? '*' : ' ';
+  binformat[12] = (bin & 0x0040) ? '*' : ' ';
+  binformat[14] = (bin & 0x0020) ? '*' : ' ';
+  binformat[15] = (bin & 0x0010) ? '*' : ' ';
+  binformat[16] = (bin & 0x0008) ? '*' : ' ';
+  binformat[18] = (bin & 0x0004) ? '*' : ' ';
+  binformat[19] = (bin & 0x0002) ? '*' : ' ';
+  binformat[20] = (bin & 0x0001) ? '*' : ' ';
+  printf(binformat);
+}
+#endif
+
 t_stat sim_instr (void)
 {
 uint32 intrq, dmarq;					/* set after setjmp */
@@ -665,7 +689,6 @@
 int abortval;
 
 /* Restore register state */
-
 if (dev_conflict ()) return SCPE_STOP;			/* check consistency */
 AR = saved_AR & DMASK;					/* restore reg */
 BR = saved_BR & DMASK;
@@ -774,6 +797,13 @@
 	    break;  }
 	if (mp_evrff) mp_viol = PC;			/* if ok, upd mp_viol */
 	IR = ReadW (PC);				/* fetch instr */
+#ifdef BLINKENLIGHTS
+printf("\e[s\e[1;1HPC:"); binprint(PC);
+printf("\e[2;1HAR:"); binprint(AR);
+printf("\e[3;1HBR:"); binprint(BR);
+printf("\e[4;1H\e[K\e[u");
+fflush(stdout);
+#endif
 	PC = (PC + 1) & VAMASK;
 	sim_interval = sim_interval - 1;
 	ion_defer = 0;  }

