mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
PDP1, PDP10, PDP11, ID16, ID32, NOVA, VAX: Open LPT, PTP devices for append
This implements the principle of "least surprise", in that users won't normally expect to start overwriting an existing file on these devices. Real hardware didn't behave that way. A new (empty) file can always be created with the -N switch on the ATTACH.
This commit is contained in:
@@ -50,6 +50,7 @@ int32 lpt_stopioe = 0; /* stop on error flag */
|
||||
int32 lpt (int32 pulse, int32 code, int32 AC);
|
||||
t_stat lpt_svc (UNIT *uptr);
|
||||
t_stat lpt_reset (DEVICE *dptr);
|
||||
t_stat lpt_attach (UNIT *uptr, CONST char *ptr);
|
||||
|
||||
/* LPT data structures
|
||||
|
||||
@@ -80,7 +81,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
|
||||
};
|
||||
|
||||
@@ -153,3 +154,9 @@ DEV_UPDATE_INTR ;
|
||||
sim_cancel (&lpt_unit); /* deactivate unit */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
t_stat lpt_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
sim_switches |= SWMASK('A'); /* position to EOF */
|
||||
return attach_unit (uptr, cptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user