1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +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:
Mark Pizzolato
2020-04-28 07:09:20 -07:00
parent 580b388917
commit 4313f9fe3c
12 changed files with 120 additions and 11 deletions

View File

@@ -189,6 +189,7 @@ t_stat lpt_attach (UNIT *uptr, CONST char *cptr)
t_stat reason;
lpt_csr = lpt_csr & ~CSR_ERR;
sim_switches |= SWMASK('A');
reason = attach_unit (uptr, cptr);
if ((lpt_unit.flags & UNIT_ATT) == 0)
lpt_csr = lpt_csr | CSR_ERR;
@@ -206,7 +207,9 @@ t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cpt
fprintf (st, "Line Printer (LPT)\n\n");
fprintf (st, "The line printer (LPT) writes data to a disk file. The POS register specifies\n");
fprintf (st, "the number of the next data item to be written. Thus, by changing POS, the\n");
fprintf (st, "user can backspace or advance the printer.\n");
fprintf (st, "user can backspace or advance the printer.\n\n");
fprintf (st, "The default position after ATTACH is to position at the end of an existing file.\n");
fprintf (st, "A new file can be created if you attach with the -N switch.\n\n");
fprint_set_help (st, dptr);
fprint_show_help (st, dptr);
fprint_reg_help (st, dptr);

View File

@@ -406,7 +406,9 @@ t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cpt
fprintf (st, "PC11 Paper Tape Punch (PTP)\n\n");
fprintf (st, "The paper tape punch (PTP) writes data to a disk file. The POS register\n");
fprintf (st, "specifies the number of the next data item to be written. Thus, by changing\n");
fprintf (st, "POS, the user can backspace or advance the punch.\n");
fprintf (st, "POS, the user can backspace or advance the punch.\n\n");
fprintf (st, "The default position after ATTACH is to position at the end of an existing file.\n");
fprintf (st, "A new file can be created if you attach with the -N switch.\n\n");
fprint_set_help (st, dptr);
fprint_show_help (st, dptr);
fprint_reg_help (st, dptr);