PDP8: 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:
parent
0b3e415b8e
commit
323cd48244
3 changed files with 11 additions and 1 deletions
|
@ -177,6 +177,7 @@ t_stat lpt_attach (UNIT *uptr, CONST char *cptr)
|
|||
{
|
||||
t_stat reason;
|
||||
|
||||
sim_switches |= SWMASK ('A'); /* Default to Append to existing file */
|
||||
reason = attach_unit (uptr, cptr);
|
||||
lpt_err = (lpt_unit.flags & UNIT_ATT) == 0;
|
||||
return reason;
|
||||
|
|
|
@ -46,6 +46,7 @@ t_stat ptr_svc (UNIT *uptr);
|
|||
t_stat ptp_svc (UNIT *uptr);
|
||||
t_stat ptr_reset (DEVICE *dptr);
|
||||
t_stat ptp_reset (DEVICE *dptr);
|
||||
t_stat ptp_attach (UNIT *uptr, CONST char *cptr);
|
||||
t_stat ptr_boot (int32 unitno, DEVICE *dptr);
|
||||
const char *ptr_description (DEVICE *dptr);
|
||||
const char *ptp_description (DEVICE *dptr);
|
||||
|
@ -123,7 +124,7 @@ DEVICE ptp_dev = {
|
|||
"PTP", &ptp_unit, ptp_reg, ptp_mod,
|
||||
1, 10, 31, 1, 8, 8,
|
||||
NULL, NULL, &ptp_reset,
|
||||
NULL, NULL, NULL,
|
||||
NULL, &ptp_attach, NULL,
|
||||
&ptp_dib, 0, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
&ptp_description
|
||||
|
@ -260,6 +261,14 @@ sim_cancel (&ptp_unit); /* deactivate unit */
|
|||
return SCPE_OK;
|
||||
}
|
||||
|
||||
/* Attach routine */
|
||||
|
||||
t_stat ptp_attach (UNIT *uptr, CONST char *cptr)
|
||||
{
|
||||
sim_switches |= SWMASK ('A'); /* Default to Append to existing file */
|
||||
return attach_unit (uptr, cptr);
|
||||
}
|
||||
|
||||
/* Bootstrap routine */
|
||||
|
||||
#define BOOT_START 07756
|
||||
|
|
BIN
doc/pdp8_doc.doc
BIN
doc/pdp8_doc.doc
Binary file not shown.
Loading…
Add table
Reference in a new issue