diff --git a/PDP18B/pdp18b_lp.c b/PDP18B/pdp18b_lp.c index 345c9382..58852ff8 100644 --- a/PDP18B/pdp18b_lp.c +++ b/PDP18B/pdp18b_lp.c @@ -91,6 +91,7 @@ int32 lp62_66 (int32 dev, int32 pulse, int32 dat); int32 lp62_iors (void); t_stat lp62_svc (UNIT *uptr); t_stat lp62_reset (DEVICE *dptr); +t_stat lp62_attach (UNIT *uptr, CONST char *cptr); /* Type 62 LPT data structures @@ -130,7 +131,7 @@ DEVICE lp62_dev = { "LPT", &lp62_unit, lp62_reg, lp62_mod, 1, 10, 31, 1, 8, 8, NULL, NULL, &lp62_reset, - NULL, NULL, NULL, + NULL, &lp62_attach, NULL, &lp62_dib, DEV_DISABLE }; @@ -235,6 +236,14 @@ lp62_ovrpr = 0; /* clear overprint */ return SCPE_OK; } +/* Attach routine */ + +t_stat lp62_attach (UNIT *uptr, CONST char *cptr) +{ +sim_switches |= SWMASK ('A'); +return attach_unit (uptr, cptr); +} + /* IORS routine */ int32 lp62_iors (void) @@ -482,6 +491,7 @@ t_stat lp647_attach (UNIT *uptr, CONST char *cptr) { t_stat reason; +sim_switches |= SWMASK ('A'); reason = attach_unit (uptr, cptr); lp647_err = (lp647_unit.flags & UNIT_ATT)? 0: 1; /* clr/set error */ return reason; @@ -646,6 +656,7 @@ t_stat lp09_attach (UNIT *uptr, CONST char *cptr) { t_stat reason; +sim_switches |= SWMASK ('A'); reason = attach_unit (uptr, cptr); lp09_err = (lp09_unit.flags & UNIT_ATT)? 0: 1; /* clr/set error */ return reason; @@ -694,6 +705,7 @@ int32 lp15_66 (int32 dev, int32 pulse, int32 dat); int32 lp15_iors (void); t_stat lp15_svc (UNIT *uptr); t_stat lp15_reset (DEVICE *dptr); +t_stat lp15_attach (UNIT *uptr, CONST char *cptr); int32 lp15_updsta (int32 New); @@ -736,7 +748,7 @@ DEVICE lp15_dev = { "LPT", &lp15_unit, lp15_reg, lp15_mod, 1, 10, 31, 1, 8, 8, NULL, NULL, &lp15_reset, - NULL, NULL, NULL, + NULL, &lp15_attach, NULL, &lp15_dib, DEV_DISABLE }; @@ -878,6 +890,14 @@ lp15_updsta (0); /* update status */ return SCPE_OK; } +/* Attach routine */ + +t_stat lp15_attach (UNIT *uptr, CONST char *cptr) +{ +sim_switches |= SWMASK ('A'); +return attach_unit (uptr, cptr); +} + /* IORS routine */ int32 lp15_iors (void) diff --git a/PDP18B/pdp18b_stddev.c b/PDP18B/pdp18b_stddev.c index 2dcc9f17..c47ceb76 100644 --- a/PDP18B/pdp18b_stddev.c +++ b/PDP18B/pdp18b_stddev.c @@ -650,9 +650,11 @@ return ((TST_INT (PTR)? IOS_PTR: 0) t_stat ptr_attach (UNIT *uptr, CONST char *cptr) { t_stat reason; +int32 saved_switches = sim_switches; -sim_switches |= SWMASK ('R'); +sim_switches &= ~SWMASK ('A'); reason = attach_unit (uptr, cptr); +sim_switches = saved_switches; if (reason != SCPE_OK) return reason; ptr_err = 0; /* attach clrs error */ @@ -969,10 +971,13 @@ return SCPE_OK; t_stat ptp_attach (UNIT *uptr, CONST char *cptr) { t_stat reason; +int32 saved_switches = sim_switches; +sim_switches |= SWMASK ('A'); /* Default to Append to existing file */ reason = attach_unit (uptr, cptr); if (reason != SCPE_OK) return reason; +sim_switches = saved_switches; ptp_err = 0; ptp_unit.flags = ptp_unit.flags & ~UNIT_PASCII; if (sim_switches & SWMASK ('A')) diff --git a/doc/pdp18b_doc.doc b/doc/pdp18b_doc.doc index d23c1ccb..34e11779 100644 Binary files a/doc/pdp18b_doc.doc and b/doc/pdp18b_doc.doc differ