From 6bf92de3dbf191da055e4dfcbee90d05d2f91465 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 14 Oct 2015 13:12:51 -0700 Subject: [PATCH] All VAX: Also return correct Unibus/Qbus vectors for devices with more than one vector. Fix #241 --- PDP11/pdp11_io_lib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PDP11/pdp11_io_lib.c b/PDP11/pdp11_io_lib.c index 13249cb0..dc829ffb 100644 --- a/PDP11/pdp11_io_lib.c +++ b/PDP11/pdp11_io_lib.c @@ -784,6 +784,8 @@ AUTO_CON auto_tab[] = {/*c #v am vm fxa fxv */ #endif #endif +#define MAX(a,b) (((a)>(b))? (a) : (b)) + static void build_vector_tab (void) { int32 ilvl, ibit; @@ -792,6 +794,7 @@ AUTO_CON *autp; DEVICE *dptr; DIB *dibp; uint32 j, k; +int v; if (done) return; @@ -806,7 +809,8 @@ for (j = 0; (dptr = sim_devices[j]) != NULL; j++) { ilvl = dibp->vloc / 32; ibit = dibp->vloc % 32; #if (VEC_SET != 0) - int_vec_set[ilvl][ibit] = VEC_SET; + for (v=0; vvnum, 1); v++) + int_vec_set[ilvl][ibit+v] = VEC_SET; #endif break; }