diff --git a/H316/h316_lp.c b/H316/h316_lp.c index 6f97d85c..230626de 100644 --- a/H316/h316_lp.c +++ b/H316/h316_lp.c @@ -97,6 +97,7 @@ int32 lpt_stopioe = 0; /* stop on error */ int32 lptio (int32 inst, int32 fnc, int32 dat, int32 dev); t_stat lpt_svc (UNIT *uptr); t_stat lpt_reset (DEVICE *dptr); +t_stat lpt_attach (UNIT *uptr, CONST char *cptr); /* LPT data structures @@ -135,7 +136,7 @@ DEVICE lpt_dev = { "LPT", &lpt_unit, lpt_reg, NULL, 1, 10, 31, 1, 8, 8, NULL, NULL, &lpt_reset, - NULL, NULL, NULL, + NULL, &lpt_attach, NULL, &lpt_dib, DEV_DISABLE }; @@ -355,3 +356,11 @@ CLR_ENB (INT_LPT); sim_cancel (&lpt_unit); /* deactivate unit */ return SCPE_OK; } + +/* Attach routine */ + +t_stat lpt_attach (UNIT *uptr, CONST char *cptr) +{ +sim_switches |= SWMASK ('A'); /* Default to Append to existing file */ +return attach_unit (uptr, cptr); +} diff --git a/H316/h316_stddev.c b/H316/h316_stddev.c index ffe2876a..cf519a9f 100644 --- a/H316/h316_stddev.c +++ b/H316/h316_stddev.c @@ -421,13 +421,16 @@ return SCPE_OK; t_stat pt_attach (UNIT *uptr, CONST char *cptr) { t_stat r; +int32 saved_switches = sim_switches; if (!(uptr->flags & UNIT_ATTABLE)) /* not tti,tto */ return SCPE_NOFNC; -if (strcmp ("PTR", sim_uname (uptr)) == 0) /* PTR is read only */ - sim_switches |= SWMASK ('R'); -if ((r = attach_unit (uptr, cptr))) +sim_switches &= ~SWMASK ('A'); +if (strcmp ("PTP", sim_uname (uptr)) == 0) /* PTP is append default */ + sim_switches |= SWMASK ('A'); +if ((r = attach_unit (uptr, cptr)) != SCPE_OK) return r; +sim_switches = saved_switches; if (sim_switches & SWMASK ('A')) /* -a? ASCII */ uptr->flags |= UNIT_ASC; else if (sim_switches & SWMASK ('U')) /* -u? Unix ASCII */ diff --git a/doc/h316_doc.doc b/doc/h316_doc.doc index ed848656..d0bdf7a4 100644 Binary files a/doc/h316_doc.doc and b/doc/h316_doc.doc differ