[Simh] [PATCH 14 of 14] sim_printf_log() changes for H316

Peter Lund firefly at vax64.dk
Mon Sep 10 17:09:48 EDT 2007


1 file changed, 5 insertions(+), 17 deletions(-)
H316/h316_cpu.c |   22 +++++-----------------


# HG changeset patch
# User Peter Lund <firefly at vax64.dk>
# Date 1189306659 -7200
# Node ID f4fe4988f8c33196d25c3a9b4289ba39e942123a
# Parent  1784e41ec49b9c5c1572050a11a2be76e3204fd2
sim_printf_log() changes for H316

diff -r 1784e41ec49b -r f4fe4988f8c3 H316/h316_cpu.c
--- a/H316/h316_cpu.c	Sun Sep 09 04:57:25 2007 +0200
+++ b/H316/h316_cpu.c	Sun Sep 09 04:57:39 2007 +0200
@@ -197,6 +197,7 @@
 */
 
 #include "h316_defs.h"
+#include "sim_console.h"
 
 #define PCQ_SIZE        64                              /* must be 2**n */
 #define PCQ_MASK        (PCQ_SIZE - 1)
@@ -263,7 +264,6 @@ extern int32 sim_int_char;
 extern int32 sim_int_char;
 extern int32 sim_interval;
 extern uint32 sim_brk_types, sim_brk_dflt, sim_brk_summ; /* breakpoint info */
-extern FILE *sim_log;
 extern DEVICE *sim_devices[];
 
 t_bool devtab_init (void);
@@ -1372,10 +1372,7 @@ for (i = 0; dptr = sim_devices[i]; i++) 
     dno = dibp->dev;                                    /* device number */
     for (j = 0; j < dibp->num; j++) {                   /* repeat for slots */
         if (iotab[dno + j]) {                           /* conflict? */
-            printf ("%s device number conflict, devno = %02o\n",
-                sim_dname (dptr), dno + j);
-            if (sim_log) fprintf (sim_log,
-                "%s device number conflict, devno = %02o\n",
+            sim_printf_log ("%s device number conflict, devno = %02o\n",
                 sim_dname (dptr), dno + j);
             return TRUE;
             }
@@ -1384,26 +1381,17 @@ for (i = 0; dptr = sim_devices[i]; i++) 
     if (dibp->chan) {                                   /* DMA/DMC? */
         chan = dibp->chan - 1;
         if ((chan < DMC_V_DMC1) && (chan >= dma_nch)) {
-            printf ("%s configured for DMA channel %d\n",
-                sim_dname (dptr), chan + 1);
-            if (sim_log) fprintf (sim_log,
-                "%s configured for DMA channel %d\n",
+            sim_printf_log ("%s configured for DMA channel %d\n",
                 sim_dname (dptr), chan + 1);
             return TRUE;
             }
         if ((chan >= DMC_V_DMC1) && !(cpu_unit.flags & UNIT_DMC)) {
-            printf ("%s configured for DMC, option disabled\n",
-                sim_dname (dptr));
-            if (sim_log) fprintf (sim_log, 
-                "%s configured for DMC, option disabled\n",
+            sim_printf_log ("%s configured for DMC, option disabled\n",
                 sim_dname (dptr));
             return TRUE;
             }
         if (chan_map[chan]) {                           /* channel conflict? */
-            printf ("%s DMA/DMC channel conflict, devno = %02o\n",
-                sim_dname (dptr), dno);
-            if (sim_log) fprintf (sim_log,
-                "%s DMA/DMC channel conflict, devno = %02o\n",
+            sim_printf_log ("%s DMA/DMC channel conflict, devno = %02o\n",
                 sim_dname (dptr), dno);
             return TRUE;
             }



More information about the Simh mailing list