mirror of
https://github.com/open-simh/simh.git
synced 2026-02-16 12:53:46 +00:00
ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps to identify unexpected coding errors. Most simulators can now also be compiled with a C++ compiler without warnings. Additionally, these changes have also been configured to facilitate easier backporting of simulator and device simulation modules to run under the simh v3.9+ SCP framework.
This commit is contained in:
@@ -47,8 +47,8 @@ int32 tmxr_poll = 16000; /* term mux poll */
|
||||
int32 clk (int32 IR, int32 AC);
|
||||
t_stat clk_svc (UNIT *uptr);
|
||||
t_stat clk_reset (DEVICE *dptr);
|
||||
t_stat clk_set_freq (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat clk_show_freq (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat clk_set_freq (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat clk_show_freq (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
/* CLK data structures
|
||||
|
||||
@@ -171,7 +171,7 @@ return SCPE_OK;
|
||||
|
||||
/* Set frequency */
|
||||
|
||||
t_stat clk_set_freq (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat clk_set_freq (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (cptr)
|
||||
return SCPE_ARG;
|
||||
@@ -183,7 +183,7 @@ return SCPE_OK;
|
||||
|
||||
/* Show frequency */
|
||||
|
||||
t_stat clk_show_freq (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat clk_show_freq (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
fprintf (st, (clk_tps == 50)? "50Hz": "60Hz");
|
||||
return SCPE_OK;
|
||||
|
||||
@@ -244,9 +244,9 @@ InstHistory *hst = NULL; /* instruction history *
|
||||
t_stat cpu_ex (t_value *vptr, t_addr addr, UNIT *uptr, int32 sw);
|
||||
t_stat cpu_dep (t_value val, t_addr addr, UNIT *uptr, int32 sw);
|
||||
t_stat cpu_reset (DEVICE *dptr);
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
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_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_bool build_dev_tab (void);
|
||||
|
||||
/* CPU data structures
|
||||
@@ -1407,7 +1407,7 @@ return SCPE_OK;
|
||||
|
||||
/* Memory size change */
|
||||
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 mc = 0;
|
||||
uint32 i;
|
||||
@@ -1426,7 +1426,7 @@ return SCPE_OK;
|
||||
|
||||
/* Change device number for a device */
|
||||
|
||||
t_stat set_dev (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat set_dev (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
DEVICE *dptr;
|
||||
DIB *dibp;
|
||||
@@ -1452,7 +1452,7 @@ return SCPE_OK;
|
||||
|
||||
/* Show device number for a device */
|
||||
|
||||
t_stat show_dev (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat show_dev (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
DEVICE *dptr;
|
||||
DIB *dibp;
|
||||
@@ -1513,7 +1513,7 @@ return FALSE;
|
||||
|
||||
/* Set history */
|
||||
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat cpu_set_hist (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 i, lnt;
|
||||
t_stat r;
|
||||
@@ -1544,10 +1544,10 @@ return SCPE_OK;
|
||||
|
||||
/* Show history */
|
||||
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
int32 l, k, di, lnt;
|
||||
char *cptr = (char *) desc;
|
||||
const char *cptr = (const char *) desc;
|
||||
t_stat r;
|
||||
t_value sim_eval;
|
||||
InstHistory *h;
|
||||
|
||||
@@ -156,11 +156,10 @@ static uint8 ct_fnc_tab[SRA_M_FNC + 1] = {
|
||||
OP_WRI|OP_FWD, OP_REV, 0, OP_FWD
|
||||
};
|
||||
|
||||
DEVICE ct_dev;
|
||||
int32 ct70 (int32 IR, int32 AC);
|
||||
t_stat ct_svc (UNIT *uptr);
|
||||
t_stat ct_reset (DEVICE *dptr);
|
||||
t_stat ct_attach (UNIT *uptr, char *cptr);
|
||||
t_stat ct_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat ct_detach (UNIT *uptr);
|
||||
t_stat ct_boot (int32 unitno, DEVICE *dptr);
|
||||
uint32 ct_updsta (UNIT *uptr);
|
||||
@@ -650,7 +649,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat ct_attach (UNIT *uptr, char *cptr)
|
||||
t_stat ct_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
t_stat r;
|
||||
|
||||
|
||||
@@ -209,8 +209,8 @@ typedef struct {
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
t_stat set_dev (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat show_dev (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat set_dev (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat show_dev (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
void cpu_set_bootpc (int32 pc);
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@ int32 df_time = 10; /* inter-word time */
|
||||
int32 df_burst = 1; /* burst mode flag */
|
||||
int32 df_stopioe = 1; /* stop on error */
|
||||
|
||||
DEVICE df_dev;
|
||||
int32 df60 (int32 IR, int32 AC);
|
||||
int32 df61 (int32 IR, int32 AC);
|
||||
int32 df62 (int32 IR, int32 AC);
|
||||
@@ -116,8 +115,8 @@ t_stat df_svc (UNIT *uptr);
|
||||
t_stat pcell_svc (UNIT *uptr);
|
||||
t_stat df_reset (DEVICE *dptr);
|
||||
t_stat df_boot (int32 unitno, DEVICE *dptr);
|
||||
t_stat df_attach (UNIT *uptr, char *cptr);
|
||||
t_stat df_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat df_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat df_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
|
||||
/* DF32 data structures
|
||||
|
||||
@@ -353,7 +352,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat df_attach (UNIT *uptr, char *cptr)
|
||||
t_stat df_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 p, sz;
|
||||
uint32 ds_bytes = DF_DKSIZE * sizeof (int16);
|
||||
@@ -371,7 +370,7 @@ return attach_unit (uptr, cptr);
|
||||
|
||||
/* Change disk size */
|
||||
|
||||
t_stat df_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat df_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (val < 0)
|
||||
return SCPE_IERR;
|
||||
|
||||
@@ -276,12 +276,11 @@ int32 dt_substate = 0;
|
||||
int32 dt_logblk = 0;
|
||||
int32 dt_stopoffr = 0;
|
||||
|
||||
DEVICE dt_dev;
|
||||
int32 dt76 (int32 IR, int32 AC);
|
||||
int32 dt77 (int32 IR, int32 AC);
|
||||
t_stat dt_svc (UNIT *uptr);
|
||||
t_stat dt_reset (DEVICE *dptr);
|
||||
t_stat dt_attach (UNIT *uptr, char *cptr);
|
||||
t_stat dt_attach (UNIT *uptr, CONST char *cptr);
|
||||
void dt_flush (UNIT *uptr);
|
||||
t_stat dt_detach (UNIT *uptr);
|
||||
t_stat dt_boot (int32 unitno, DEVICE *dptr);
|
||||
@@ -1202,7 +1201,7 @@ return SCPE_OK;
|
||||
If 12b, read data into buffer
|
||||
*/
|
||||
|
||||
t_stat dt_attach (UNIT *uptr, char *cptr)
|
||||
t_stat dt_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 pdp18b[D18_NBSIZE];
|
||||
uint16 pdp11b[D18_NBSIZE], *fbuf;
|
||||
|
||||
@@ -167,7 +167,6 @@ uint32 fpp_last_lockbit = 0; /* last lockbit */
|
||||
static FPN fpp_zero = { 0, { 0, 0, 0, 0, 0 } };
|
||||
static FPN fpp_one = { 1, { 02000, 0, 0, 0, 0 } };
|
||||
|
||||
DEVICE fpp_dev;
|
||||
int32 fpp55 (int32 IR, int32 AC);
|
||||
int32 fpp56 (int32 IR, int32 AC);
|
||||
void fpp_load_apt (uint32 apta);
|
||||
|
||||
@@ -38,11 +38,10 @@ extern int32 int_req, int_enable, dev_done, stop_inst;
|
||||
int32 lpt_err = 0; /* error flag */
|
||||
int32 lpt_stopioe = 0; /* stop on error */
|
||||
|
||||
DEVICE lpt_dev;
|
||||
int32 lpt (int32 IR, int32 AC);
|
||||
t_stat lpt_svc (UNIT *uptr);
|
||||
t_stat lpt_reset (DEVICE *dptr);
|
||||
t_stat lpt_attach (UNIT *uptr, char *cptr);
|
||||
t_stat lpt_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat lpt_detach (UNIT *uptr);
|
||||
|
||||
/* LPT data structures
|
||||
@@ -165,7 +164,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat lpt_attach (UNIT *uptr, char *cptr)
|
||||
t_stat lpt_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
t_stat reason;
|
||||
|
||||
|
||||
@@ -145,18 +145,17 @@ int32 mt_time = 10; /* record latency */
|
||||
int32 mt_stopioe = 1; /* stop on error */
|
||||
uint8 *mtxb = NULL; /* transfer buffer */
|
||||
|
||||
DEVICE mt_dev;
|
||||
int32 mt70 (int32 IR, int32 AC);
|
||||
int32 mt71 (int32 IR, int32 AC);
|
||||
int32 mt72 (int32 IR, int32 AC);
|
||||
t_stat mt_svc (UNIT *uptr);
|
||||
t_stat mt_reset (DEVICE *dptr);
|
||||
t_stat mt_attach (UNIT *uptr, char *cptr);
|
||||
t_stat mt_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat mt_detach (UNIT *uptr);
|
||||
int32 mt_updcsta (UNIT *uptr);
|
||||
int32 mt_ixma (int32 xma);
|
||||
t_stat mt_map_err (UNIT *uptr, t_stat st);
|
||||
t_stat mt_vlock (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat mt_vlock (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
UNIT *mt_busy (void);
|
||||
void mt_set_done (void);
|
||||
|
||||
@@ -618,7 +617,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat mt_attach (UNIT *uptr, char *cptr)
|
||||
t_stat mt_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
t_stat r;
|
||||
int32 u = uptr - mt_dev.units; /* get unit number */
|
||||
@@ -649,7 +648,7 @@ return sim_tape_detach (uptr);
|
||||
|
||||
/* Write lock/enable routine */
|
||||
|
||||
t_stat mt_vlock (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat mt_vlock (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 u = uptr - mt_dev.units; /* get unit number */
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ int32 rf_time = 10; /* inter-word time */
|
||||
int32 rf_burst = 1; /* burst mode flag */
|
||||
int32 rf_stopioe = 1; /* stop on error */
|
||||
|
||||
DEVICE rf_dev;
|
||||
int32 rf60 (int32 IR, int32 AC);
|
||||
int32 rf61 (int32 IR, int32 AC);
|
||||
int32 rf62 (int32 IR, int32 AC);
|
||||
@@ -126,8 +125,8 @@ t_stat rf_svc (UNIT *uptr);
|
||||
t_stat pcell_svc (UNIT *uptr);
|
||||
t_stat rf_reset (DEVICE *dptr);
|
||||
t_stat rf_boot (int32 unitno, DEVICE *dptr);
|
||||
t_stat rf_attach (UNIT *uptr, char *cptr);
|
||||
t_stat rf_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat rf_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat rf_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
|
||||
/* RF08 data structures
|
||||
|
||||
@@ -419,7 +418,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat rf_attach (UNIT *uptr, char *cptr)
|
||||
t_stat rf_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 sz, p;
|
||||
uint32 ds_bytes = RF_DKSIZE * sizeof (int16);
|
||||
@@ -437,7 +436,7 @@ return attach_unit (uptr, cptr);
|
||||
|
||||
/* Change disk size */
|
||||
|
||||
t_stat rf_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat rf_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (val < 0)
|
||||
return SCPE_IERR;
|
||||
|
||||
@@ -138,7 +138,6 @@ int32 rk_ma = 0; /* memory address */
|
||||
int32 rk_swait = 10, rk_rwait = 10; /* seek, rotate wait */
|
||||
int32 rk_stopioe = 1; /* stop on error */
|
||||
|
||||
DEVICE rk_dev;
|
||||
int32 rk (int32 IR, int32 AC);
|
||||
t_stat rk_svc (UNIT *uptr);
|
||||
t_stat rk_reset (DEVICE *dptr);
|
||||
|
||||
@@ -174,16 +174,15 @@ int32 rl_swait = 10; /* seek wait */
|
||||
int32 rl_rwait = 10; /* rotate wait */
|
||||
int32 rl_stopioe = 1; /* stop on error */
|
||||
|
||||
DEVICE rl_dev;
|
||||
int32 rl60 (int32 IR, int32 AC);
|
||||
int32 rl61 (int32 IR, int32 AC);
|
||||
t_stat rl_svc (UNIT *uptr);
|
||||
t_stat rl_reset (DEVICE *dptr);
|
||||
void rl_set_done (int32 error);
|
||||
t_stat rl_boot (int32 unitno, DEVICE *dptr);
|
||||
t_stat rl_attach (UNIT *uptr, char *cptr);
|
||||
t_stat rl_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat rl_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat rl_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat rl_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat rl_set_bad (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
|
||||
/* RL8A data structures
|
||||
|
||||
@@ -573,7 +572,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat rl_attach (UNIT *uptr, char *cptr)
|
||||
t_stat rl_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 p;
|
||||
t_stat r;
|
||||
@@ -604,7 +603,7 @@ return SCPE_OK;
|
||||
|
||||
/* Set size routine */
|
||||
|
||||
t_stat rl_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat rl_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (uptr->flags & UNIT_ATT)
|
||||
return SCPE_ALATT;
|
||||
@@ -628,7 +627,7 @@ return SCPE_OK;
|
||||
sta = status code
|
||||
*/
|
||||
|
||||
t_stat rl_set_bad (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat rl_set_bad (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 i, da = RL_BBMAP * RL_NUMBY;
|
||||
|
||||
|
||||
@@ -137,17 +137,16 @@ int32 rx_stopioe = 0; /* stop on error */
|
||||
uint8 rx_buf[RX2_NUMBY] = { 0 }; /* sector buffer */
|
||||
int32 rx_bptr = 0; /* buffer pointer */
|
||||
|
||||
DEVICE rx_dev;
|
||||
int32 rx (int32 IR, int32 AC);
|
||||
t_stat rx_svc (UNIT *uptr);
|
||||
t_stat rx_reset (DEVICE *dptr);
|
||||
t_stat rx_boot (int32 unitno, DEVICE *dptr);
|
||||
t_stat rx_set_size (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat rx_attach (UNIT *uptr, char *cptr);
|
||||
t_stat rx_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat rx_attach (UNIT *uptr, CONST char *cptr);
|
||||
void rx_cmd (void);
|
||||
void rx_done (int32 esr_flags, int32 new_ecode);
|
||||
t_stat rx_settype (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat rx_showtype (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat rx_settype (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat rx_showtype (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
/* RX8E data structures
|
||||
|
||||
@@ -593,7 +592,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat rx_attach (UNIT *uptr, char *cptr)
|
||||
t_stat rx_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 sz;
|
||||
|
||||
@@ -608,7 +607,7 @@ return attach_unit (uptr, cptr);
|
||||
|
||||
/* Set size routine */
|
||||
|
||||
t_stat rx_set_size (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat rx_set_size (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
if (uptr->flags & UNIT_ATT)
|
||||
return SCPE_ALATT;
|
||||
@@ -620,7 +619,7 @@ return SCPE_OK;
|
||||
|
||||
/* Set controller type */
|
||||
|
||||
t_stat rx_settype (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat rx_settype (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
int32 i;
|
||||
|
||||
@@ -644,7 +643,7 @@ return SCPE_OK;
|
||||
|
||||
/* Show controller type */
|
||||
|
||||
t_stat rx_showtype (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat rx_showtype (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
if (rx_28) fprintf (st, "RX28");
|
||||
else fprintf (st, "RX8E");
|
||||
|
||||
@@ -68,9 +68,9 @@ extern REG cpu_reg[];
|
||||
extern uint16 M[];
|
||||
|
||||
t_stat fprint_sym_fpp (FILE *of, t_value *val);
|
||||
t_stat parse_sym_fpp (char *cptr, t_value *val);
|
||||
char *parse_field (char *cptr, uint32 max, uint32 *val, uint32 c);
|
||||
char *parse_fpp_xr (char *cptr, uint32 *xr, t_bool inc);
|
||||
t_stat parse_sym_fpp (CONST char *cptr, t_value *val);
|
||||
CONST char *parse_field (CONST char *cptr, uint32 max, uint32 *val, uint32 c);
|
||||
CONST char *parse_fpp_xr (CONST char *cptr, uint32 *xr, t_bool inc);
|
||||
int32 test_fpp_addr (uint32 ad, uint32 max);
|
||||
|
||||
/* SCP data structures and interface routines
|
||||
@@ -241,7 +241,7 @@ return SCPE_IERR;
|
||||
/* Binary loader
|
||||
Two loader formats are supported: RIM loader (-r) and BIN (-b) loader. */
|
||||
|
||||
t_stat sim_load (FILE *fileref, char *cptr, char *fnam, int flag)
|
||||
t_stat sim_load (FILE *fileref, CONST char *cptr, CONST char *fnam, int flag)
|
||||
{
|
||||
if ((*cptr != 0) || (flag != 0))
|
||||
return SCPE_ARG;
|
||||
@@ -518,7 +518,7 @@ static const int32 fop_val[] = {
|
||||
Inputs:
|
||||
*of = output stream
|
||||
inst = mask bits
|
||||
class = instruction class code
|
||||
Class = instruction class code
|
||||
sp = space needed?
|
||||
Outputs:
|
||||
status = space needed
|
||||
@@ -529,13 +529,13 @@ static const int32 fop_val[] = {
|
||||
#define fputs(_s,f) Fprintf(f,"%s",_s)
|
||||
#define fputc(_c,f) Fprintf(f,"%c",_c)
|
||||
|
||||
int32 fprint_opr (FILE *of, int32 inst, int32 class, int32 sp)
|
||||
int32 fprint_opr (FILE *of, int32 inst, int32 Class, int32 sp)
|
||||
{
|
||||
int32 i, j;
|
||||
|
||||
for (i = 0; opc_val[i] >= 0; i++) { /* loop thru ops */
|
||||
j = (opc_val[i] >> I_V_FL) & I_M_FL; /* get class */
|
||||
if ((j == class) && (opc_val[i] & inst)) { /* same class? */
|
||||
if ((j == Class) && (opc_val[i] & inst)) { /* same class? */
|
||||
inst = inst & ~opc_val[i]; /* mask bit set? */
|
||||
fprintf (of, (sp? " %s": "%s"), opcode[i]);
|
||||
sp = 1;
|
||||
@@ -678,7 +678,7 @@ return SCPE_ARG;
|
||||
status = error status
|
||||
*/
|
||||
|
||||
t_stat parse_sym (char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
|
||||
t_stat parse_sym (CONST char *cptr, t_addr addr, UNIT *uptr, t_value *val, int32 sw)
|
||||
{
|
||||
uint32 cflag, d, i, j, k;
|
||||
t_stat r;
|
||||
@@ -868,7 +868,7 @@ return SCPE_ARG;
|
||||
|
||||
/* FPP8 instruction parse */
|
||||
|
||||
t_stat parse_sym_fpp (char *cptr, t_value *val)
|
||||
t_stat parse_sym_fpp (CONST char *cptr, t_value *val)
|
||||
{
|
||||
uint32 i, j, ad, xr;
|
||||
int32 broff, nwd;
|
||||
@@ -969,7 +969,7 @@ return -nwd;
|
||||
|
||||
/* Parse field */
|
||||
|
||||
char *parse_field (char *cptr, uint32 max, uint32 *val, uint32 c)
|
||||
CONST char *parse_field (CONST char *cptr, uint32 max, uint32 *val, uint32 c)
|
||||
{
|
||||
char gbuf[CBUFSIZE];
|
||||
t_stat r;
|
||||
@@ -983,7 +983,7 @@ return cptr;
|
||||
|
||||
/* Parse index register */
|
||||
|
||||
char *parse_fpp_xr (char *cptr, uint32 *xr, t_bool inc)
|
||||
CONST char *parse_fpp_xr (CONST char *cptr, uint32 *xr, t_bool inc)
|
||||
{
|
||||
char gbuf[CBUFSIZE];
|
||||
uint32 len;
|
||||
|
||||
@@ -193,11 +193,10 @@ int32 td_dctime = 40000; /* decel time */
|
||||
int32 td_stopoffr = 0;
|
||||
static uint8 tdb_mtk[DT_NUMDR][D18_LPERB]; /* mark track bits */
|
||||
|
||||
DEVICE td_dev;
|
||||
int32 td77 (int32 IR, int32 AC);
|
||||
t_stat td_svc (UNIT *uptr);
|
||||
t_stat td_reset (DEVICE *dptr);
|
||||
t_stat td_attach (UNIT *uptr, char *cptr);
|
||||
t_stat td_attach (UNIT *uptr, CONST char *cptr);
|
||||
void td_flush (UNIT *uptr);
|
||||
t_stat td_detach (UNIT *uptr);
|
||||
t_stat td_boot (int32 unitno, DEVICE *dptr);
|
||||
@@ -208,7 +207,7 @@ int32 td_trailer (UNIT *uptr, int32 blk, int32 line);
|
||||
int32 td_read (UNIT *uptr, int32 blk, int32 line);
|
||||
void td_write (UNIT *uptr, int32 blk, int32 line, int32 datb);
|
||||
int32 td_set_mtk (int32 code, int32 u, int32 k);
|
||||
t_stat td_show_pos (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat td_show_pos (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
|
||||
extern uint16 M[];
|
||||
|
||||
@@ -766,7 +765,7 @@ return SCPE_OK;
|
||||
Set up mark track bit array
|
||||
*/
|
||||
|
||||
t_stat td_attach (UNIT *uptr, char *cptr)
|
||||
t_stat td_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
uint32 pdp18b[D18_NBSIZE];
|
||||
uint16 pdp11b[D18_NBSIZE], *fbuf;
|
||||
@@ -931,7 +930,7 @@ return k;
|
||||
|
||||
/* Show position */
|
||||
|
||||
t_stat td_show_pos (FILE *st, UNIT *uptr, int32 val, void *desc)
|
||||
t_stat td_show_pos (FILE *st, UNIT *uptr, int32 val, CONST void *desc)
|
||||
{
|
||||
if ((uptr->flags & UNIT_ATT) == 0) return SCPE_UNATT;
|
||||
if (uptr->pos < DT_EZLIN) /* rev end zone? */
|
||||
|
||||
@@ -60,7 +60,6 @@ extern int32 tsc_enb; /* enable */
|
||||
#define UNIT_V_SN699 (UNIT_V_UF + 0) /* SN 699 or above */
|
||||
#define UNIT_SN699 (1 << UNIT_V_SN699)
|
||||
|
||||
DEVICE tsc_dev;
|
||||
int32 tsc (int32 IR, int32 AC);
|
||||
t_stat tsc_reset (DEVICE *dptr);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ t_stat tti_svc (UNIT *uptr);
|
||||
t_stat tto_svc (UNIT *uptr);
|
||||
t_stat tti_reset (DEVICE *dptr);
|
||||
t_stat tto_reset (DEVICE *dptr);
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
|
||||
/* TTI data structures
|
||||
|
||||
@@ -273,7 +273,7 @@ sim_cancel (&tto_unit); /* deactivate unit */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, char *cptr, void *desc)
|
||||
t_stat tty_set_mode (UNIT *uptr, int32 val, CONST char *cptr, void *desc)
|
||||
{
|
||||
tti_unit.flags = (tti_unit.flags & ~TT_MODE) | val;
|
||||
tto_unit.flags = (tto_unit.flags & ~TT_MODE) | val;
|
||||
|
||||
@@ -70,14 +70,13 @@ int32 ttx_tps = 100; /* polls per second */
|
||||
TMLN ttx_ldsc[TTX_LINES] = { {0} }; /* line descriptors */
|
||||
TMXR ttx_desc = { TTX_LINES, 0, 0, ttx_ldsc }; /* mux descriptor */
|
||||
|
||||
DEVICE ttix_dev, ttox_dev;
|
||||
int32 ttix (int32 IR, int32 AC);
|
||||
int32 ttox (int32 IR, int32 AC);
|
||||
t_stat ttix_svc (UNIT *uptr);
|
||||
t_stat ttix_reset (DEVICE *dptr);
|
||||
t_stat ttox_svc (UNIT *uptr);
|
||||
t_stat ttox_reset (DEVICE *dptr);
|
||||
t_stat ttx_attach (UNIT *uptr, char *cptr);
|
||||
t_stat ttx_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat ttx_detach (UNIT *uptr);
|
||||
void ttx_enbdis (int32 dis);
|
||||
|
||||
@@ -376,7 +375,7 @@ return SCPE_OK;
|
||||
|
||||
/* Attach master unit */
|
||||
|
||||
t_stat ttx_attach (UNIT *uptr, char *cptr)
|
||||
t_stat ttx_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
t_stat r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user