1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-26 04:07:23 +00:00

Fix for Issue #53 for DC, DL, and VH multiplexer devices

This commit is contained in:
Mark Pizzolato
2013-05-16 11:04:43 -07:00
parent e82507d9c8
commit 76fccce27d
3 changed files with 27 additions and 9 deletions

View File

@@ -47,7 +47,7 @@
#include "sim_sock.h"
#include "sim_tmxr.h"
#define DCX_MASK (DCX_LINES - 1)
#define DCX_MAXMUX (dcx_desc.lines - 1)
/* Parity and modem control */
@@ -270,7 +270,10 @@ DEVICE dco_dev = {
t_stat dcx_rd (int32 *data, int32 PA, int32 access)
{
int32 ln = ((PA - dci_dib.ba) >> 3) & DCX_MASK;
int32 ln = ((PA - dci_dib.ba) >> 3);
if (ln > DCX_MAXMUX) /* validate line number */
return SCPE_IERR;
switch ((PA >> 1) & 03) { /* decode PA<2:1> */
@@ -301,9 +304,12 @@ return SCPE_NXM;
t_stat dcx_wr (int32 data, int32 PA, int32 access)
{
int32 ln = ((PA - dci_dib.ba) >> 3) & DCX_MASK;
int32 ln = ((PA - dci_dib.ba) >> 3);
TMLN *lp = &dcx_ldsc[ln];
if (ln > DCX_MAXMUX) /* validate line number */
return SCPE_IERR;
switch ((PA >> 1) & 03) { /* decode PA<2:1> */
case 00: /* dci csr */