KA10, KI10, KL10: 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
6e6706f2a4
commit
3c081a80c1
2 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,7 @@ t_stat lpt_attach (UNIT *uptr, CONST char *cptr)
|
|||
{
|
||||
t_stat reason;
|
||||
|
||||
sim_switches |= SWMASK ('A'); /* Position to EOF */
|
||||
reason = attach_unit (uptr, cptr);
|
||||
if (sim_switches & SIM_SW_REST)
|
||||
return reason;
|
||||
|
|
|
@ -209,6 +209,7 @@ t_stat ptp_attach (UNIT *uptr, CONST char *cptr)
|
|||
{
|
||||
t_stat reason;
|
||||
|
||||
sim_switches |= SWMASK ('A'); /* Default to Append to existing file */
|
||||
reason = attach_unit (uptr, cptr);
|
||||
uptr->STATUS &= ~NO_TAPE_PP;
|
||||
return reason;
|
||||
|
@ -409,6 +410,7 @@ fprintf (st, "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, "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);
|
||||
|
|
Loading…
Add table
Reference in a new issue