mirror of
https://github.com/simh/simh.git
synced 2026-02-22 23:29:15 +00:00
Merge remote-tracking branch 'github-simh/master' into KDP
This commit is contained in:
@@ -197,6 +197,7 @@ jmp_buf save_env;
|
||||
int32 hst_p = 0; /* history pointer */
|
||||
int32 hst_lnt = 0; /* history length */
|
||||
InstHistory *hst = NULL; /* instruction history */
|
||||
int32 apr_serial = -1; /* CPU Serial number */
|
||||
|
||||
/* Forward and external declarations */
|
||||
|
||||
@@ -205,6 +206,9 @@ t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw);
|
||||
t_stat cpu_reset (DEVICE *dptr);
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat cpu_set_serial (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat cpu_show_serial (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
|
||||
d10 adjsp (d10 val, a10 ea);
|
||||
void ibp (a10 ea, int32 pflgs);
|
||||
d10 ldb (a10 ea, int32 pflgs);
|
||||
@@ -400,6 +404,7 @@ MTAB cpu_mod[] = {
|
||||
NULL, &show_iospace },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_NMO|MTAB_SHP, 0, "HISTORY", "HISTORY",
|
||||
&cpu_set_hist, &cpu_show_hist },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "SERIAL", "SERIAL", &cpu_set_serial, &cpu_show_serial },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
@@ -2104,7 +2109,14 @@ return;
|
||||
|
||||
t_bool aprid (a10 ea, int32 prv)
|
||||
{
|
||||
Write (ea, (Q_ITS)? UC_AIDITS: UC_AIDDEC, prv);
|
||||
d10 value = (Q_ITS)? UC_AIDITS: UC_AIDDEC;
|
||||
|
||||
if( (apr_serial == -1) || (!Q_ITS && apr_serial < 4096) )
|
||||
value |= (Q_ITS)? UC_SERITS: UC_SERDEC;
|
||||
else
|
||||
value |= apr_serial;
|
||||
|
||||
Write (ea, value, prv);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2419,3 +2431,34 @@ for (k = 0; k < lnt; k++) { /* print specified */
|
||||
} /* end for */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Set serial */
|
||||
|
||||
t_stat cpu_set_serial (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
{
|
||||
int32 lnt;
|
||||
t_stat r;
|
||||
|
||||
if (cptr == NULL) {
|
||||
apr_serial = -1;
|
||||
return SCPE_OK;
|
||||
}
|
||||
lnt = (int32) get_uint (cptr, 10, 077777, &r);
|
||||
if ((r != SCPE_OK) || (lnt <= 0) || (!Q_ITS && lnt < 4096))
|
||||
return SCPE_ARG;
|
||||
apr_serial = lnt & 077777;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Show serial */
|
||||
|
||||
t_stat cpu_show_serial (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
{
|
||||
fprintf (st, "Serial: " );
|
||||
if( (apr_serial == -1) || (!Q_ITS && apr_serial < 4096) ) {
|
||||
fprintf (st, "%d (default)", (Q_ITS)? UC_SERITS: UC_SERDEC);
|
||||
return SCPE_OK;
|
||||
}
|
||||
fprintf (st, "%d", apr_serial);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -476,8 +476,9 @@ typedef t_int64 d10; /* PDP-10 data (36b) */
|
||||
#define UC_SERDEC 4097 /* serial number */
|
||||
#define UC_SERITS 1729
|
||||
#define UC_AIDDEC (UC_INHCST | UC_UBABLT | UC_KIPAGE | UC_KLPAGE | \
|
||||
UC_VERDEC | UC_SERDEC)
|
||||
#define UC_AIDITS (UC_KIPAGE | UC_VERITS | UC_SERITS)
|
||||
UC_VERDEC)
|
||||
#define UC_AIDITS (UC_KIPAGE | UC_VERITS)
|
||||
|
||||
#define UC_HSBDEC 0376000 /* DEC initial HSB */
|
||||
#define UC_HSBITS 0000500 /* ITS initial HSB */
|
||||
|
||||
@@ -619,6 +620,7 @@ typedef struct pdp_dib DIB;
|
||||
|
||||
#define DZ_MUXES 4 /* max # of muxes */
|
||||
#define DZ_LINES 8 /* lines per mux */
|
||||
#define DUP_LINES 4 /* max # of DUP11's */
|
||||
#define DIB_MAX 100 /* max DIBs */
|
||||
|
||||
#define DEV_V_UBUS (DEV_V_UF + 0) /* Unibus */
|
||||
@@ -712,6 +714,9 @@ typedef struct pdp_dib DIB;
|
||||
#define INT_V_PTP 25
|
||||
#define INT_V_LP20 26 /* LPT20 */
|
||||
#define INT_V_CR 27 /* CD20 (CD11) */
|
||||
#define INT_V_CR 27 /* CD20 (CD11) */
|
||||
#define INT_V_DUPRX 28 /* DUP11 */
|
||||
#define INT_V_DUPTX 29
|
||||
|
||||
#define INT_RP (1u << INT_V_RP)
|
||||
#define INT_TU (1u << INT_V_TU)
|
||||
@@ -729,6 +734,8 @@ typedef struct pdp_dib DIB;
|
||||
#define INT_PTP (1u << INT_V_PTP)
|
||||
#define INT_LP20 (1u << INT_V_LP20)
|
||||
#define INT_CR (1u << INT_V_CR)
|
||||
#define INT_DUPRX (1u << INT_V_DUPRX)
|
||||
#define INT_DUPTX (1u << INT_V_DUPTX)
|
||||
|
||||
#define IPL_RP 6 /* int levels */
|
||||
#define IPL_TU 6
|
||||
@@ -742,6 +749,8 @@ typedef struct pdp_dib DIB;
|
||||
#define IPL_DZRX 5
|
||||
#define IPL_DZTX 5
|
||||
#define IPL_RY 5
|
||||
#define IPL_DUPRX 5
|
||||
#define IPL_DUPTX 5
|
||||
#define IPL_PTR 4
|
||||
#define IPL_PTP 4
|
||||
#define IPL_LP20 4
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
lp20 line printer
|
||||
|
||||
29-May-13 TL Force append when an existing file is attached.
|
||||
Previously over-wrote file from the top.
|
||||
19-Jan-07 RMS Added UNIT_TEXT flag
|
||||
04-Sep-05 RMS Fixed missing return (found by Peter Schorn)
|
||||
07-Jul-05 RMS Removed extraneous externs
|
||||
@@ -374,17 +376,17 @@ return SCPE_OK;
|
||||
else if (paper)
|
||||
davfu_action;
|
||||
else print_xlate;
|
||||
}
|
||||
}
|
||||
else if (paper) {
|
||||
if (xlate || delim || delim_hold)
|
||||
davfu_action;
|
||||
else print_input;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (xlate || delim || delim_hold)
|
||||
print_xlate;
|
||||
else print_input;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
t_stat lp20_svc (UNIT *uptr)
|
||||
@@ -657,6 +659,10 @@ t_stat lp20_attach (UNIT *uptr, char *cptr)
|
||||
t_stat reason;
|
||||
|
||||
reason = attach_unit (uptr, cptr); /* attach file */
|
||||
if (reason == SCPE_OK) {
|
||||
sim_fseek (uptr->fileref, 0, SEEK_END);
|
||||
uptr->pos = sim_ftell (uptr->fileref);
|
||||
}
|
||||
if (lpcsa & CSA_ONL) /* just file chg? */
|
||||
return reason;
|
||||
if (sim_is_active (&lp20_unit)) /* busy? no int */
|
||||
|
||||
@@ -56,7 +56,7 @@ extern DEVICE ry_dev;
|
||||
extern DEVICE cr_dev;
|
||||
extern DEVICE lp20_dev;
|
||||
extern DEVICE kmc_dev;
|
||||
extern DEVICE dup_dev[];
|
||||
extern DEVICE dup_dev;
|
||||
extern UNIT cpu_unit;
|
||||
extern REG cpu_reg[];
|
||||
extern d10 *M;
|
||||
@@ -92,9 +92,8 @@ DEVICE *sim_devices[] = {
|
||||
&rp_dev,
|
||||
&tu_dev,
|
||||
&dz_dev,
|
||||
&kmc_dev,
|
||||
&dup_dev[0],
|
||||
&dup_dev[1],
|
||||
&kmc_dev,
|
||||
&dup_dev,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user