Add -A to boot, Document & init FE comm area

The KS10's 8080 interfaces to the OS thru a small communications region.

The documentation is rather lacking, and the 8080 microcode is difficult
to follow.  Many years ago (while still at DEC), I worked it out, and
put definitions into TOPS-10.  They're now here, too.

Also, properly initialize the KLINIK communication words and the
keep-alive word.
This commit is contained in:
Timothe Litt 2013-06-18 22:42:48 -04:00
parent 6076a48f25
commit 2efb0a1d65

View file

@ -113,6 +113,46 @@ DEVICE fe_dev = {
input character).
*/
/* Here is the definition of the communications area:
XPP RLWORD,31 ;RELOAD WORD [FE_KEEPA]
KSRLD==1B4 ;RELOAD REQUEST (8080 will reload -10 if this is set)
KPACT==1B5 ;KEEP ALIVE ACTIVE (8080 reloads -10 if KPALIV doesn't change)
KLACT==1B6 ;KLINIK ACTIVE (Remote diagnosis line enabled)
PAREN==1B7 ;PARITY ERROR DETECT ENABLED
CRMPAR==1B8 ;CRAM PAR ERR DETECT ENABLED
DRMPAR==1B9 ;DRAM PAR ERR DETECT ENABLED
CASHEN==1B10 ;CACHE ENABLED
MILSEN==1B11 ;1MSEC ENABLED
KPALIV==377B28 ;KEEP ALIVE WORD
; Why reload (8080->10)
AUTOBT==1B32 ;BOOT SWITCH OR POWER UP CONDITION
PWRFAL==1B33 ;POWER FAIL restart (Start at 70)
FORREL==1B34 ;FORCED RELOAD
KEPFAL==1B35 ;KEEP ALIVE FAILURE (XCT exec 71)
XPP CTYIWD,32 ;CTY INPUT WORD [FE_CTYIN]
CTYICH==377B35 ;CTY INPUT CHARACTER
CTYIVL==1B27 ;INPUT VALID BIT (Actually, this is an 8-bit function code)
XPP CTYOWD,33 ;CTY OUTPUT WORD [FE_CTYOUT]
CTYOCH==377B35 ;CTY OUTPUT CHARACTER
CTYOVL==1B27 ;OUTPUT VALID FLAG
XPP KLIIWD,34 ;KLINIK INPUT WORD [FE_KLININ]
KLIICH==377B35 ;KLINIK INPUT CHARACTER
KLIIVL==1B27 ;KLINIK INPUT VALID (Historical)
KLICHR==1B27 ;KLINIK CHARACTER
KLIINI==2B27 ;KLINIK INITED
KLICAR==3B27 ;CARRIER LOST
XPP KLIOWD,35 ;KLINIK OUTPUT WORD [FE_KLINOUT]
KLIOCH==377B35 ;KLINIK OUTPUT CHARACTER
KLIOVL==1B27 ;KLINIK OUTPUT VALID (Historical)
KLOCHR==1B27 ;KLINIK CHARACTER AVAILABLE
KLIHUP==2B27 ;KLINIK HANGUP REQUEST
*/
void fe_intr (void)
{
if (M[FE_CTYOUT] & FE_CVALID) { /* char to print? */
@ -162,7 +202,11 @@ t_stat fe_reset (DEVICE *dptr)
{
tmxr_set_console_units (&fe_unit[0], &fe_unit[1]);
fei_unit.buf = feo_unit.buf = 0;
M[FE_CTYIN] = M[FE_CTYOUT] = 0;
M[FE_KLININ] = M[FE_KLINOUT] = 0;
M[FE_KEEPA] = INT64_C(0003700000000);
apr_flg = apr_flg & ~(APRF_ITC | APRF_CON);
sim_activate (&fei_unit, KBD_WAIT (fei_unit.wait, tmxr_poll));
return SCPE_OK;