diff --git a/Interdata/id_lp.c b/Interdata/id_lp.c index 8fa1b44e..44cda00e 100644 --- a/Interdata/id_lp.c +++ b/Interdata/id_lp.c @@ -285,6 +285,7 @@ return SCPE_OK; t_stat lpt_attach (UNIT *uptr, CONST char *cptr) { lpt_vfup = 0; /* top of form */ +sim_switches |= SWMASK ('A'); /* position to EOF */ return attach_unit (uptr, cptr); } diff --git a/NOVA/nova_lp.c b/NOVA/nova_lp.c index 638625ac..c7f71d56 100644 --- a/NOVA/nova_lp.c +++ b/NOVA/nova_lp.c @@ -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); +} diff --git a/PDP1/pdp1_lp.c b/PDP1/pdp1_lp.c index 7e887fb4..a27bc78e 100644 --- a/PDP1/pdp1_lp.c +++ b/PDP1/pdp1_lp.c @@ -59,6 +59,10 @@ extern int32 stop_inst; t_stat lpt_svc (UNIT *uptr); t_stat lpt_reset (DEVICE *dptr); +t_stat lpt_attach (UNIT *uptr, CONST char *ptr); +t_stat lpt_detach (UNIT *uptr); +t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); +const char *lpt_description (DEVICE *dptr); /* LPT data structures @@ -82,7 +86,7 @@ REG lpt_reg[] = { { DRDATAD (POS, lpt_unit.pos, T_ADDR_W, "position in the output file"), PV_LEFT }, { DRDATAD (TIME, lpt_unit.wait, 24, "time from I/O initiation to interrupt"), PV_LEFT }, { FLDATAD (STOP_IOE, lpt_stopioe, 0, "stop on I/O error") }, -{ BRDATAD (LBUF, lpt_buf, 8, 8, LPT_BSIZE, "line buffer") }, + { BRDATAD (LBUF, lpt_buf, 8, 8, LPT_BSIZE, "line buffer") }, { DRDATA (SBSLVL, lpt_sbs, 4), REG_HRO }, { NULL } }; @@ -97,8 +101,10 @@ DEVICE lpt_dev = { "LPT", &lpt_unit, lpt_reg, lpt_mod, 1, 10, 31, 1, 8, 8, NULL, NULL, &lpt_reset, - NULL, NULL, NULL, - NULL, DEV_DISABLE + NULL, &lpt_attach, &lpt_detach, + NULL, DEV_DISABLE, 0, + NULL, NULL, NULL, &lpt_help, NULL, NULL, + &lpt_description }; /* Line printer IOT routine */ @@ -212,3 +218,41 @@ iosta = iosta & ~(IOS_PNT | IOS_SPC); /* clear flags */ sim_cancel (&lpt_unit); /* deactivate unit */ return SCPE_OK; } + +t_stat lpt_attach (UNIT *uptr, CONST char *cptr) +{ +t_stat reason; + +sim_switches |= SWMASK('A'); /* position to EOF */ +reason = attach_unit (uptr, cptr); +return reason; +} + +t_stat lpt_detach (UNIT *uptr) +{ +return detach_unit (uptr); +} + +t_stat lpt_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr) +{ +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\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); +fprintf (st, "\nError handling is as follows:\n\n"); +fprintf (st, " error STOP_IOE processed as\n"); +fprintf (st, " not attached 1 out of paper\n"); +fprintf (st, " 0 disk not ready\n\n"); +fprintf (st, " OS I/O error x report error and stop\n"); +return SCPE_OK; +} + +const char *lpt_description (DEVICE *dptr) +{ +return "Type 62 Line Printer"; +} diff --git a/PDP1/pdp1_stddev.c b/PDP1/pdp1_stddev.c index f18eeea3..78ac5edb 100644 --- a/PDP1/pdp1_stddev.c +++ b/PDP1/pdp1_stddev.c @@ -106,6 +106,10 @@ t_stat tty_reset (DEVICE *dptr); t_stat ptr_boot (int32 unitno, DEVICE *dptr); t_stat ptr_attach (UNIT *uptr, CONST char *cptr); t_stat ptp_attach (UNIT *uptr, CONST char *cptr); +t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); +t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr); +const char *ptr_description (DEVICE *dptr); +const char *ptp_description (DEVICE *dptr); /* Character translation tables */ @@ -161,7 +165,7 @@ UNIT ptr_unit = { REG ptr_reg[] = { { ORDATAD (BUF, ptr_unit.buf, 18, "last data item processed") }, - { FLDATA (UC, ptr_uc, UC_V) }, + { FLDATAD (UC, ptr_uc, UC_V, "upper case/lower case state (shared)") }, { FLDATAD (DONE, iosta, IOS_V_PTR, "device done flag") }, { FLDATAD (RPLS, cpls, CPLS_V_PTR, "return restart pulse flag") }, { ORDATA (HOLD, ptr_hold, 9), REG_HRO }, @@ -188,7 +192,8 @@ DEVICE ptr_dev = { 1, 10, 31, 1, 8, 8, NULL, NULL, &ptr_reset, &ptr_boot, &ptr_attach, NULL, - NULL, 0 + NULL, 0, 0, NULL, + NULL, NULL, &ptr_help, NULL, NULL, &ptr_description }; /* PTP data structures @@ -226,7 +231,8 @@ DEVICE ptp_dev = { 1, 10, 31, 1, 8, 8, NULL, NULL, &ptp_reset, NULL, &ptp_attach, NULL, - NULL, 0 + NULL, 0, 0, NULL, + NULL, NULL, &ptp_help, NULL, NULL, &ptp_description }; /* TTI data structures @@ -458,7 +464,7 @@ ptr_leader = PTR_LEADER; /* set up leader */ if (sim_switches & SWMASK ('A')) uptr->flags = uptr->flags | UNIT_ASCII; else uptr->flags = uptr->flags & ~UNIT_ASCII; -sim_switches |= SWMASK ('R'); +sim_switches &= ~SWMASK ('A'); /* Turn off A switch to avoid Append mode ambiguity */ return attach_unit (uptr, cptr); } @@ -504,6 +510,29 @@ for (;;) { return SCPE_OK; /* done */ } +t_stat ptr_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr) +{ +fprintf (st, "Paper Tape Reader (PTR)\n\n"); +fprintf (st, "The paper tape reader (PTR) reads data from a disk file. The POS register\n"); +fprintf (st, "specifies the number of the next data item to be read. Thus, by changing\n"); +fprintf (st, "The paper tape reader supports the BOOT command. BOOT PTR copies the RIM\n"); +fprintf (st, "loader into memory and starts it running. BOOT PTR loads into the field\n"); +fprintf (st, "selected by TA<0:3> (the high order four bits of the address switches).\n\n"); +fprintf (st, "The paper tape reader recognizes one switch at ATTACH time:\n\n"); +fprintf (st, " ATT -A PTP convert input characters from ASCII\n\n"); +fprintf (st, "By default, the paper tape reader does no conversions on input characters.\n\n"); +fprint_set_help (st, dptr); +fprint_show_help (st, dptr); +fprint_reg_help (st, dptr); +return SCPE_OK; +} + +const char *ptr_description (DEVICE *dptr) +{ +return "Paper Tape Reader"; +} + + /* Paper tape punch: IOT routine */ int32 ptp (int32 inst, int32 dev, int32 dat) @@ -582,9 +611,31 @@ t_stat ptp_attach (UNIT *uptr, CONST char *cptr) if (sim_switches & SWMASK ('A')) uptr->flags = uptr->flags | UNIT_ASCII; else uptr->flags = uptr->flags & ~UNIT_ASCII; +sim_switches |= SWMASK ('A'); /* Default to Append to existing file */ return attach_unit (uptr, cptr); } +t_stat ptp_help (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr) +{ +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\n"); +fprintf (st, "The paper tape punch recognizes two switches at ATTACH time:\n\n"); +fprintf (st, " ATT -A PTP output characters as ASCII text\n"); +fprintf (st, " ATT -N PTP create a new (empty) output file\n\n"); +fprintf (st, "By default, the paper tape punch punches files with no conversions.\n\n"); +fprint_set_help (st, dptr); +fprint_show_help (st, dptr); +fprint_reg_help (st, dptr); +return SCPE_OK; +} + +const char *ptp_description (DEVICE *dptr) +{ +return "Paper Tape Punch"; +} + /* Typewriter IOT routines */ int32 tti (int32 inst, int32 dev, int32 dat) diff --git a/PDP10/pdp10_lp20.c b/PDP10/pdp10_lp20.c index 0ad49ea3..3f5b52da 100644 --- a/PDP10/pdp10_lp20.c +++ b/PDP10/pdp10_lp20.c @@ -949,7 +949,8 @@ return SCPE_OK; static t_stat lp20_attach (UNIT *uptr, CONST char *cptr) { t_stat reason; - + +sim_switches |= SWMASK ('A'); /* position to EOF */ reason = attach_unit (uptr, cptr); /* attach file */ if (reason == SCPE_OK) { sim_fseek (uptr->fileref, 0, SEEK_END); diff --git a/PDP11/pdp11_lp.c b/PDP11/pdp11_lp.c index 23920715..e9fb881b 100644 --- a/PDP11/pdp11_lp.c +++ b/PDP11/pdp11_lp.c @@ -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); diff --git a/PDP11/pdp11_pt.c b/PDP11/pdp11_pt.c index 0fd1f871..7b0b63ef 100644 --- a/PDP11/pdp11_pt.c +++ b/PDP11/pdp11_pt.c @@ -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); diff --git a/doc/id_doc.doc b/doc/id_doc.doc index 27eabd6c..bc6569d8 100644 Binary files a/doc/id_doc.doc and b/doc/id_doc.doc differ diff --git a/doc/nova_doc.doc b/doc/nova_doc.doc index 5b0785e5..485ff2b6 100644 Binary files a/doc/nova_doc.doc and b/doc/nova_doc.doc differ diff --git a/doc/pdp10_doc.doc b/doc/pdp10_doc.doc index 9400d18d..78f9086c 100644 Binary files a/doc/pdp10_doc.doc and b/doc/pdp10_doc.doc differ diff --git a/doc/pdp11_doc.doc b/doc/pdp11_doc.doc index aa32aacf..e767c752 100644 Binary files a/doc/pdp11_doc.doc and b/doc/pdp11_doc.doc differ diff --git a/doc/pdp1_doc.doc b/doc/pdp1_doc.doc index 91080b27..20d34385 100644 Binary files a/doc/pdp1_doc.doc and b/doc/pdp1_doc.doc differ