From 89cd2d458ffc8984d99312a790444d6c68bde508 Mon Sep 17 00:00:00 2001 From: Bob Supnik Date: Sat, 23 Oct 2021 15:09:10 -0700 Subject: [PATCH] PDP8: Fix device conflict warnings to report problems correctly As reported in #1084 --- PDP8/pdp8_cpu.c | 4 ++-- PDP8/pdp8_fpp.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/PDP8/pdp8_cpu.c b/PDP8/pdp8_cpu.c index 3b1990df..c91c6c98 100644 --- a/PDP8/pdp8_cpu.c +++ b/PDP8/pdp8_cpu.c @@ -1,6 +1,6 @@ /* pdp8_cpu.c: PDP-8 CPU simulator - Copyright (c) 1993-2017, Robert M Supnik + Copyright (c) 1993-2021, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -1533,7 +1533,7 @@ for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { /* add devices */ if (dspp->dsp) { /* any dispatch? */ if (dev_tab[dspp->dev]) { /* already filled? */ sim_printf ("%s device number conflict at %02o\n", - sim_dname (dptr), dibp->dev + j); + sim_dname (dptr), dspp->dev); return TRUE; } dev_tab[dspp->dev] = dspp->dsp; /* fill */ diff --git a/PDP8/pdp8_fpp.c b/PDP8/pdp8_fpp.c index 18501c11..81926ecf 100644 --- a/PDP8/pdp8_fpp.c +++ b/PDP8/pdp8_fpp.c @@ -1,6 +1,6 @@ /* pdp8_fpp.c: PDP-8 floating point processor (FPP8A) - Copyright (c) 2007-2011, Robert M Supnik + Copyright (c) 2007-2021, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -25,6 +25,7 @@ fpp FPP8A floating point processor + 21-Oct-21 RMS Added device number display 03-Jan-10 RMS Initialized variables statically, for VMS compiler 19-Apr-09 RHM FPICL does not clear all command and status reg bits modify fpp_reset to conform with FPP @@ -242,8 +243,13 @@ REG fpp_reg[] = { { NULL } }; +MTAB fpp_mod[] = { + { MTAB_XTD|MTAB_VDV, 0, "DEVNO", NULL, NULL, &show_dev }, + { 0 } + }; + DEVICE fpp_dev = { - "FPP", &fpp_unit, fpp_reg, NULL, + "FPP", &fpp_unit, fpp_reg, fpp_mod, 1, 10, 31, 1, 8, 8, NULL, NULL, &fpp_reset, NULL, NULL, NULL,