1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-25 11:51:32 +00:00

Notes For V3.5-1

The source set has been extensively overhauled.  For correct
viewing, set Visual C++ or Emacs to have tab stops every 4
characters.

1. New Features

1.1 3.5-0

1.1.1 All Ethernet devices

- Added Windows user-defined adapter names (from Timothe Litt)

1.1.2 Interdata, SDS, HP, PDP-8, PDP-18b terminal multiplexors

- Added support for SET <unit>n DISCONNECT

1.1.3 VAX

- Added latent QDSS support
- Revised autoconfigure to handle QDSS

1.1.4 PDP-11

- Revised autoconfigure to handle more cases

1.2 3.5-1

No new features

1.3 3.5-2

1.3.1 All ASCII terminals

- Most ASCII terminal emulators have supported 7-bit and 8-bit
  operation; where required, they have also supported an upper-
  case only or KSR-emulation mode.  This release adds a new mode,
  7P, for 7-bit printing characters.  In 7P mode, non-printing
  characters in the range 0-31 (decimal), and 127 (decimal), are
  automatically suppressed.  This prevents printing of fill
  characters under Windows.

  The printable character set for ASCII code values 0-31 can be
  changed with the SET CONSOLE PCHAR command.  Code value 127
  (DELETE) is always suppressed.

1.3.2 VAX-11/780

- First release.  The VAX-11/780 has successfully run VMS V7.2.  The
  commercial instructions and compatability mode have not been
  extensively tested.  The Ethernet controller is not working yet
  and is disabled.

2. Bugs Fixed

2.1 3.5-0

2.1.1 SCP and libraries

- Trim trailing spaces on all input (for example, attach file names)
- Fixed sim_sock spurious SIGPIPE error in Unix/Linux
- Fixed sim_tape misallocation of TPC map array for 64b simulators

2.1.2 1401

- Fixed bug, CPU reset was clearing SSB through SSG

2.1.3 PDP-11

- Fixed bug in VH vector display routine
- Fixed XU runt packet processing (found by Tim Chapman)

2.1.4 Interdata

- Fixed bug in SHOW PAS CONN/STATS
- Fixed potential integer overflow exception in divide

2.1.5 SDS

- Fixed bug in SHOW MUX CONN/STATS

2.1.6 HP

- Fixed bug in SHOW MUX CONN/STATS

2.1.7 PDP-8

- Fixed bug in SHOW TTIX CONN/STATS
- Fixed bug in SET/SHOW TTOXn LOG

2.1.8 PDP-18b

- Fixed bug in SHOW TTIX CONN/STATS
- Fixed bug in SET/SHOW TTOXn LOG

2.1.9 Nova, Eclipse

- Fixed potential integer overflow exception in divide

2.2 3.5-1

2.2.1 1401

- Changed character encodings to be compatible with Pierce 709X simulator
- Added mode for old/new character encodings

2.2.2 1620

- Changed character encodings to be compatible with Pierce 709X simulator

2.2.3 PDP-10

- Changed MOVNI to eliminate GCC warning

2.2.4 VAX

- Fixed bug in structure definitions with 32b compilation options
- Fixed bug in autoconfiguration table

2.2.5 PDP-11

- Fixed bug in autoconfiguration table

2.3 3.5-2

2.3.1 PDP-10

- RP: fixed drive clear not to clear disk address

2.3.2 PDP-11 (VAX, VAX-11/780, for shared peripherals)

- HK: fixed overlap seek interaction with drive select, drive clear, etc
- RQ, TM, TQ, TS, TU: widened address display to 64b when USE_ADDR64 option selected
- TU: changed default adapter from TM02 to TM03 (required by VMS)
- RP: fixed drive clear not to clear disk address
- RP, TU: fixed device enable/disable to enabled/disable Massbus adapter as well
- XQ: fixed register access alignment bug (found by Doug Carman)

2.3.3 PDP-8

- RL: fixed IOT 61 decoding bug (found by David Gesswein)
- DF, DT, RF: fixed register access alignment bug (found by Doug Carman)

2.3.4 VAX

- Fixed CVTfi to trap on integer overflow if PSW<iv> is set
- Fixed breakpoint detection when USE_ADDR64 option selected
This commit is contained in:
Bob Supnik
2006-01-23 20:01:00 -08:00
committed by Mark Pizzolato
parent 1e704bf185
commit a12e4a1c39
85 changed files with 7425 additions and 1035 deletions

View File

@@ -27,6 +27,7 @@
MP 12892B memory protect
DMA0,DMA1 12895A/12897B direct memory access/dual channel port controller
26-Dec-05 JDB Improved reporting in dev_conflict
22-Sep-05 RMS Fixed declarations (from Sterling Garwood)
21-Jan-05 JDB Reorganized CPU option flags
15-Jan-05 RMS Split out EAU and MAC instructions
@@ -2051,29 +2052,47 @@ return;
t_bool dev_conflict (void)
{
DEVICE *dptr, *cdptr;
DIB *dibp, *chkp;
uint32 i, j, dno;
DEVICE *dptr;
DIB *dibp;
uint32 i, j, k;
t_bool is_conflict = FALSE;
uint32 conflicts[I_DEVMASK + 1] = { 0 };
for (i = 0; cdptr = sim_devices[i]; i++) {
chkp = (DIB *) cdptr->ctxt;
if (chkp && !(cdptr->flags & DEV_DIS)) {
dno = chkp->devno;
for (j = 0; dptr = sim_devices[j]; j++) {
dibp = (DIB *) dptr->ctxt;
if (dibp && !(dptr->flags & DEV_DIS) &&
(chkp != dibp) && (dno == dibp->devno)) {
printf ("%s device number conflict, devno = %d\n",
sim_dname (dptr), dno);
if (sim_log) fprintf (sim_log,
"%s device number conflict, devno = %d\n",
sim_dname (dptr), dno);
return TRUE;
for (i = 0; dptr = sim_devices[i]; i++) {
dibp = (DIB *) dptr->ctxt;
if (dibp && !(dptr->flags & DEV_DIS))
if (++conflicts[dibp->devno] > 1)
is_conflict = TRUE;
}
if (is_conflict) {
sim_ttcmd();
for (i = 0; i <= I_DEVMASK; i++) {
if (conflicts[i] > 1) {
k = conflicts[i];
printf ("Select code %o conflict:", i);
if (sim_log) fprintf (sim_log, "Select code %o conflict:", i);
for (j = 0; dptr = sim_devices[j]; j++) {
dibp = (DIB *) dptr->ctxt;
if (dibp && !(dptr->flags & DEV_DIS) && (i == dibp->devno)) {
if (k < conflicts[i]) {
printf (" and");
if (sim_log) fputs (" and", sim_log);
}
printf (" %s", sim_dname (dptr));
if (sim_log) fprintf (sim_log, " %s", sim_dname (dptr));
k = k - 1;
if (k == 0) {
putchar ('\n');
if (sim_log) fputc ('\n', sim_log);
break;
}
}
}
}
}
}
return FALSE;
return is_conflict;
}
/* Configuration validation

View File

@@ -1,7 +1,7 @@
To: Users
From: Bob Supnik
Subj: HP2100 Simulator Usage
Date: 01-Jul-2005
Date: 01-Dec-2005
COPYRIGHT NOTICE
@@ -442,13 +442,22 @@ The console teleprinter has three units: keyboard (unit 0), printer
(unit 1), and punch (unit 2). The keyboard reads from the console
keyboard; the printer writes to the simulator console window. The punch
writes to a disk file. The keyboard and printer units (TTY0, TTY1) can
be set to one of three modes: UC, 7B, or 8B. In UC mode, lower case
input and output characters are automatically converted to upper case.
In 7B mode, input and output characters are masked to 7 bits. In 8B
mode, characters are not modified. In UC and 7B mode, output of control
characters other than BEL, BS, HT, LF, and CR is suppressed; in 8B mode,
output of all characters is permitted. Changing the mode of either the
keyboard or the printer changes both. The default mode is UC.
be set to one of four modes: UC, 7P, 7B, or 8B:
mode input characters output characters
UC lower case converted lower case converted
to upper case, to upper case,
high-order bit cleared high-order bit cleared,
non-printing characters
suppressed
7P high-order bit cleared high-order bit cleared,
non-printing characters
suppressed
7B high-order bit cleared high-order bit cleared
8B no changes no changes
The default mode is UC.
Some HP software systems expect the console to transmit line-feed
automatically following carriage-return. This feature is enabled with:
@@ -664,14 +673,26 @@ the port to be used:
where port is a decimal number between 1 and 65535 that is not being used
for other TCP/IP activities.
Each line (each unit of MUXL) can be set to one of three modes: UC, 7B,
or 8B. In UC mode, lower case input and output characters are converted
automatically to upper case. In 7B mode, input and output characters
are masked to 7 bits. In 8B mode, characters are not modified. The
default mode is UC. In addition, each line supports the DATASET option.
DATASET, when set, enables modem control. The default settings are UC
mode and DATASET disabled. Finally, each line supports output logging.
The SET MUXLn LOG command enables logging on a line:
Each line (each unit of MUXL) can be set to one of four modes: UC, 7P, 7B,
or 8B:
mode input characters output characters
UC lower case converted lower case converted
to upper case, to upper case,
high-order bit cleared high-order bit cleared,
non-printing characters
suppressed
7P high-order bit cleared high-order bit cleared,
non-printing characters
suppressed
7B high-order bit cleared high-order bit cleared
8B no changes no changes
In addition, each line supports the DATASET option. DATASET, when set,
enables modem control. The default settings are UC mode and DATASET disabled.
Finally, each line supports output logging. The SET MUXLn LOG command enables
logging on a line:
SET MUXLn LOG=filename log output of line n to filename

View File

@@ -205,7 +205,6 @@
extern uint32 PC, SR;
extern uint32 dev_cmd[2], dev_ctl[2], dev_flg[2], dev_fbf[2], dev_srq[2];
extern int32 sim_switches;
extern UNIT cpu_unit;
int32 dp_ctype = 1; /* ctrl type */
int32 dpc_busy = 0; /* cch unit */

View File

@@ -141,8 +141,6 @@
extern uint32 PC, SR;
extern uint32 dev_cmd[2], dev_ctl[2], dev_flg[2], dev_fbf[2], dev_srq[2];
extern int32 sim_switches;
extern UNIT cpu_unit;
int32 dqc_busy = 0; /* cch xfer */
int32 dqc_cnt = 0; /* check count */

View File

@@ -342,7 +342,6 @@ static struct drvtyp drv_tab[] = {
extern uint32 PC, SR;
extern uint32 dev_cmd[2], dev_ctl[2], dev_flg[2], dev_fbf[2], dev_srq[2];
extern int32 sim_switches;
extern UNIT cpu_unit;
uint32 ds_fifo[DS_FIFO_SIZE] = { 0 }; /* fifo */
uint32 ds_fifo_ip = 0; /* insertion ptr */

View File

@@ -141,7 +141,6 @@
extern uint32 PC, SR;
extern uint32 dev_cmd[2], dev_ctl[2], dev_flg[2], dev_fbf[2], dev_srq[2];
extern int32 sim_switches;
extern UNIT cpu_unit;
extern FILE *sim_deb;
int32 ms_ctype = 0; /* ctrl type */

View File

@@ -25,6 +25,7 @@
mux,muxl,muxc 12920A terminal multiplexor
22-Nov-05 RMS Revised for new terminal processing routines
29-Jun-05 RMS Added SET MUXLn DISCONNECT
07-Oct-04 JDB Allow enable/disable from any device
26-Apr-04 RMS Fixed SFS x,C and SFC x,C
@@ -56,11 +57,7 @@
#define MUX_LINES 16 /* user lines */
#define MUX_ILINES 5 /* diag rcv only */
#define UNIT_V_8B (UNIT_V_UF + 0) /* 8B */
#define UNIT_V_UC (UNIT_V_UF + 1) /* UC only */
#define UNIT_V_MDM (UNIT_V_UF + 2) /* modem control */
#define UNIT_8B (1 << UNIT_V_8B)
#define UNIT_UC (1 << UNIT_V_UC)
#define UNIT_V_MDM (TTUF_V_UF + 0) /* modem control */
#define UNIT_MDM (1 << UNIT_V_MDM)
#define MUXU_INIT_POLL 8000
#define MUXL_WAIT 500
@@ -259,29 +256,30 @@ DEVICE muxu_dev = {
*/
UNIT muxl_unit[] = {
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, UNIT_UC, 0), MUXL_WAIT }
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT },
{ UDATA (&muxo_svc, TT_MODE_UC, 0), MUXL_WAIT }
};
MTAB muxl_mod[] = {
{ UNIT_UC+UNIT_8B, UNIT_UC, "UC", "UC", NULL },
{ UNIT_UC+UNIT_8B, 0 , "7b", "7B", NULL },
{ UNIT_UC+UNIT_8B, UNIT_8B, "8b", "8B", NULL },
{ TT_MODE, TT_MODE_UC, "UC", "UC", NULL },
{ TT_MODE, TT_MODE_7B, "7b", "7B", NULL },
{ TT_MODE, TT_MODE_8B, "8b", "8B", NULL },
{ TT_MODE, TT_MODE_7P, "7p", "7P", NULL },
{ UNIT_MDM, 0, "no dataset", "NODATASET", NULL },
{ UNIT_MDM, UNIT_MDM, "dataset", "DATASET", NULL },
{ MTAB_XTD|MTAB_VUN, 0, NULL, "DISCONNECT",
@@ -552,11 +550,7 @@ for (ln = 0; ln < MUX_LINES; ln++) { /* loop thru lines */
}
else { /* normal */
if (mux_rchp[ln]) mux_sta[ln] = mux_sta[ln] | LIU_LOST;
if (muxl_unit[ln].flags & UNIT_UC) { /* cvt to UC? */
c = c & 0177;
if (islower (c)) c = toupper (c);
}
else c = c & ((muxl_unit[ln].flags & UNIT_8B)? 0377: 0177);
c = sim_tt_inpcvt (c, TT_GET_MODE (muxl_unit[ln].flags));
if (mux_rpar[ln] & OTL_ECHO) { /* echo? */
TMLN *lp = &mux_ldsc[ln]; /* get line */
tmxr_putc_ln (lp, c); /* output char */
@@ -586,18 +580,17 @@ if (mux_ldsc[ln].conn) { /* connected? */
if ((mux_xbuf[ln] & OTL_SYNC) == 0) { /* start bit 0? */
TMLN *lp = &mux_ldsc[ln]; /* get line */
c = mux_xbuf[ln]; /* get char */
if (muxl_unit[ln].flags & UNIT_UC) { /* cvt to UC? */
c = c & 0177;
if (islower (c)) c = toupper (c);
}
else c = c & ((muxl_unit[ln].flags & UNIT_8B)? 0377: 0177);
c = sim_tt_outcvt (c, TT_GET_MODE (muxl_unit[ln].flags));
if (mux_xpar[ln] & OTL_DIAG) /* xmt diag? */
mux_diag (mux_xbuf[ln]); /* before munge */
mux_xdon[ln] = 1; /* set done */
if (!(muxl_unit[ln].flags & UNIT_8B) && /* not transparent? */
(c != 0x7f) && (c != 0x13) && /* not del, ^S? */
(c != 0x11) && (c != 0x5)) /* not ^Q, ^E? */
tmxr_putc_ln (lp, c); /* output char */
/* In (default) UC or (new) 7P, all these chars are suppressed automatically */
/* if ((TT_GET_MODE (muxl_unit[ln].flags) != TT_MODE_8B) &&
/* (c != 0x7f) && (c != 0x13) && /* not del, ^S? */
/* (c != 0x11) && (c != 0x5)) /* not ^Q, ^E? */
if (c >= 0) /* valid? */
tmxr_putc_ln (lp, c); /* output char */
tmxr_poll_tx (&mux_desc); /* poll xmt */
}
}

View File

@@ -28,6 +28,7 @@
tty 12531C buffered teleprinter interface
clk 12539C time base generator
22-Nov-05 RMS Revised for new terminal processing routines
13-Sep-04 JDB Added paper tape loop mode, DIAG/READER modifiers to PTR
Added PV_LEFT to PTR TRLLIM register
Modified CLK to permit disable
@@ -96,12 +97,8 @@
#define FULL_SET 0xFFFFFFFF
#define CNTL_SET (BEL_FLAG | BS_FLAG | HT_FLAG | LF_FLAG | CR_FLAG)
#define UNIT_V_8B (UNIT_V_UF + 0) /* 8B */
#define UNIT_V_UC (UNIT_V_UF + 1) /* UC only */
#define UNIT_V_DIAG (UNIT_V_UF + 2) /* diag mode */
#define UNIT_V_AUTOLF (UNIT_V_UF + 3) /* auto linefeed */
#define UNIT_8B (1 << UNIT_V_8B)
#define UNIT_UC (1 << UNIT_V_UC)
#define UNIT_V_DIAG (TTUF_V_UF + 0) /* diag mode */
#define UNIT_V_AUTOLF (TTUF_V_UF + 1) /* auto linefeed */
#define UNIT_DIAG (1 << UNIT_V_DIAG)
#define UNIT_AUTOLF (1 << UNIT_V_AUTOLF)
@@ -117,7 +114,6 @@
extern uint32 PC, SR;
extern uint32 dev_cmd[2], dev_ctl[2], dev_flg[2], dev_fbf[2], dev_srq[2];
extern UNIT cpu_unit;
int32 ptr_stopioe = 0; /* stop on error */
int32 ptr_trlcnt = 0; /* trailer counter */
@@ -157,6 +153,7 @@ t_stat tti_svc (UNIT *uptr);
t_stat tto_svc (UNIT *uptr);
t_stat tty_reset (DEVICE *dptr);
t_stat tty_set_opt (UNIT *uptr, int32 val, char *cptr, void *desc);
t_stat tty_set_alf (UNIT *uptr, int32 val, char *cptr, void *desc);
int32 clkio (int32 inst, int32 IR, int32 dat);
t_stat clk_svc (UNIT *uptr);
t_stat clk_reset (DEVICE *dptr);
@@ -268,9 +265,9 @@ DEVICE ptp_dev = {
DIB tty_dib = { TTY, 0, 0, 0, 0, 0, &ttyio };
UNIT tty_unit[] = {
{ UDATA (&tti_svc, UNIT_UC, 0), KBD_POLL_WAIT },
{ UDATA (&tto_svc, UNIT_UC, 0), SERIAL_OUT_WAIT },
{ UDATA (&tto_svc, UNIT_SEQ+UNIT_ATTABLE+UNIT_8B, 0), SERIAL_OUT_WAIT }
{ UDATA (&tti_svc, TT_MODE_UC, 0), KBD_POLL_WAIT },
{ UDATA (&tto_svc, TT_MODE_UC, 0), SERIAL_OUT_WAIT },
{ UDATA (&tto_svc, UNIT_SEQ+UNIT_ATTABLE+TT_MODE_8B, 0), SERIAL_OUT_WAIT }
};
REG tty_reg[] = {
@@ -296,16 +293,12 @@ REG tty_reg[] = {
};
MTAB tty_mod[] = {
{ UNIT_UC+UNIT_8B, UNIT_UC, "UC", "UC", &tty_set_opt,
NULL, ((void *) (UNIT_UC + UNIT_8B)) },
{ UNIT_UC+UNIT_8B, 0 , "7b", "7B", &tty_set_opt,
NULL, ((void *) (UNIT_UC + UNIT_8B)) },
{ UNIT_UC+UNIT_8B, UNIT_8B, "8b", "8B", &tty_set_opt,
NULL, ((void *) (UNIT_UC + UNIT_8B)) },
{ UNIT_AUTOLF, UNIT_AUTOLF, "autolf", "AUTOLF", &tty_set_opt,
NULL, ((void *) UNIT_AUTOLF) },
{ UNIT_AUTOLF, 0 , NULL, "NOAUTOLF", &tty_set_opt,
NULL, ((void *) UNIT_AUTOLF) },
{ TT_MODE, TT_MODE_UC, "UC", "UC", &tty_set_opt },
{ TT_MODE, TT_MODE_7B, "7b", "7B", &tty_set_opt },
{ TT_MODE, TT_MODE_8B, "8b", "8B", &tty_set_opt },
{ TT_MODE, TT_MODE_7P, "7p", "7P", &tty_set_opt },
{ UNIT_AUTOLF, UNIT_AUTOLF, "autolf", "AUTOLF", &tty_set_alf },
{ UNIT_AUTOLF, 0 , NULL, "NOAUTOLF", &tty_set_alf },
{ MTAB_XTD | MTAB_VDV, 0, "DEVNO", "DEVNO",
&hp_setdev, &hp_showdev, &tty_dev },
{ 0 }
@@ -699,7 +692,7 @@ t_stat tti_svc (UNIT *uptr)
int32 c, dev;
dev = tty_dib.devno; /* get device no */
sim_activate (&tty_unit[TTI], tty_unit[TTI].wait); /* continue poll */
sim_activate (uptr, uptr->wait); /* continue poll */
tty_shin = 0377; /* assume inactive */
if (tty_lf) { /* auto lf pending? */
c = 012; /* force lf */
@@ -708,16 +701,12 @@ if (tty_lf) { /* auto lf pending? */
else {
if ((c = sim_poll_kbd ()) < SCPE_KFLAG) return c; /* no char or error? */
if (c & SCPE_BREAK) c = 0; /* break? */
else if (tty_unit[TTI].flags & UNIT_UC) { /* UC only? */
c = c & 0177;
if (islower (c)) c = toupper (c);
}
else c = c & ((tty_unit[TTI].flags & UNIT_8B)? 0377: 0177);
else c = sim_tt_inpcvt (c, TT_GET_MODE (uptr->flags));
tty_lf = ((c & 0177) == 015) && (uptr->flags & UNIT_AUTOLF);
}
if (tty_mode & TM_KBD) { /* keyboard enabled? */
tty_buf = c; /* put char in buf */
tty_unit[TTI].pos = tty_unit[TTI].pos + 1;
uptr->pos = uptr->pos + 1;
setFSR (dev); /* set flag */
if (c) {
tto_out (c); /* echo? */
@@ -750,12 +739,8 @@ t_stat tto_out (int32 c)
t_stat r;
if (tty_mode & TM_PRI) { /* printing? */
if (tty_unit[TTO].flags & UNIT_UC) { /* UC only? */
c = c & 0177;
if (islower (c)) c = toupper (c);
}
else c = c & ((tty_unit[TTO].flags & UNIT_8B)? 0377: 0177);
if ((c > 31) || (CHAR_FLAG (c) & tty_cntlprt)) { /* normal, ctrl? */
c = sim_tt_outcvt (c, TT_GET_MODE (tty_unit[TTO].flags));
if (c >= 0) { /* valid? */
if (r = sim_putchar_s (c)) return r; /* output char */
tty_unit[TTO].pos = tty_unit[TTO].pos + 1;
}
@@ -796,13 +781,19 @@ return SCPE_OK;
t_stat tty_set_opt (UNIT *uptr, int32 val, char *cptr, void *desc)
{
int32 u = uptr - tty_dev.units;
int32 mask = (int32) desc;
if (u > 1) return SCPE_NOFNC;
tty_unit[TTI].flags = (tty_unit[TTI].flags & ~mask) | val;
tty_unit[TTO].flags = (tty_unit[TTO].flags & ~mask) | val;
if (val == UNIT_8B) tty_cntlprt = FULL_SET;
else tty_cntlprt = tty_cntlset;
if (u > TTO) return SCPE_NOFNC;
tty_unit[TTO].flags = (tty_unit[TTO].flags & ~TT_MODE) | val;
if (val == TT_MODE_7P) val = TT_MODE_7B;
tty_unit[TTI].flags = (tty_unit[TTI].flags & ~TT_MODE) | val;
return SCPE_OK;
}
t_stat tty_set_alf (UNIT *uptr, int32 val, char *cptr, void *desc)
{
int32 u = uptr - tty_dev.units;
if (u != TTI) return SCPE_NOFNC;
return SCPE_OK;
}