diff --git a/I7000/i7000_lpr.c b/I7000/i7000_lpr.c index 4f9a3e6e..6e052a6d 100644 --- a/I7000/i7000_lpr.c +++ b/I7000/i7000_lpr.c @@ -220,8 +220,10 @@ print_line(UNIT * uptr, int chan, int unit) sim_debug(DEBUG_DETAIL, &lpr_dev, "WRS unit=%d [%s]\n", unit, &out[0]); /* Print out buffer */ - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite(&out, 1, i, uptr->fileref); + uptr->pos += i; + } if (uptr->flags & ECHO) { int j = 0; @@ -236,14 +238,18 @@ print_line(UNIT * uptr, int chan, int unit) if (uptr->u5 & URCSTA_SKIPAFT) { i = (uptr->u5 >> 12) & 0x7f; if (i == 0) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) sim_putchar('\r'); } else { for (; i > 1; i--) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); @@ -331,8 +337,10 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev) break; case 040: /* Space before */ for (i = dev & 03; i > 1; i--) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); @@ -358,8 +366,10 @@ uint32 lpr_cmd(UNIT * uptr, uint16 cmd, uint16 dev) break; } for (; i > 0; i--) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); diff --git a/I7000/i7080_cpu.c b/I7000/i7080_cpu.c index 7d7f802d..50d82bce 100644 --- a/I7000/i7080_cpu.c +++ b/I7000/i7080_cpu.c @@ -2976,10 +2976,8 @@ step6: Next(MA); sim_interval --; /* count down */ cr2 = AC[tsac]; - if (cr2 == 0) { - smt = 1; /* Check usage here */ - break; /* goto step6; */ - } + if (cr2 == 0) + goto step6; if (at) { cr1 &= 017; at = 0; diff --git a/I7000/i7090_chan.c b/I7000/i7090_chan.c index 575188c2..c1daac6a 100644 --- a/I7000/i7090_chan.c +++ b/I7000/i7090_chan.c @@ -1263,7 +1263,7 @@ chan_cmd(uint16 dev, uint16 dcmd) if ((chan_flags[chan] & (DEV_WRITE)) == (DEV_WRITE) || (chan_flags[chan] & (DEV_FULL)) == (DEV_FULL)) chan_flags[chan] |= DEV_DISCO | DEV_WEOR; - return SCPE_BUSY; + return SCPE_BUSY; } /* Unit is busy doing something, wait */ if (chan_flags[chan] & (DEV_SEL | DEV_DISCO | STA_TWAIT | STA_WAIT)) diff --git a/I7000/i7090_lpr.c b/I7000/i7090_lpr.c index 28969c71..73769fc6 100644 --- a/I7000/i7090_lpr.c +++ b/I7000/i7090_lpr.c @@ -174,8 +174,10 @@ print_line(UNIT * uptr, int chan, int unit) return SCPE_UNATT; /* attached? */ if (outsel & PRINT_3) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); @@ -185,8 +187,10 @@ print_line(UNIT * uptr, int chan, int unit) } if (outsel & PRINT_4) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n\r\n", 1, 4, uptr->fileref); + uptr->pos += 4; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); @@ -226,14 +230,18 @@ print_line(UNIT * uptr, int chan, int unit) j = 0; for (i = j; i < 72; i++) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite(" ", 1, 1, uptr->fileref); + uptr->pos += 1; + } if (uptr->flags & ECHO) sim_putchar(' '); } } else { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\n\r", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\n'); sim_putchar('\r'); @@ -265,8 +273,10 @@ print_line(UNIT * uptr, int chan, int unit) for (j = 71; j > 0 && lpr_data[unit].lbuff[j] == ' '; j--) ; /* Print out buffer */ - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite(lpr_data[unit].lbuff, 1, j+1, uptr->fileref); + uptr->pos += j+1; + } if (uptr->flags & ECHO) { for(i = 0; i <= j; i++) sim_putchar(lpr_data[unit].lbuff[i]); @@ -280,8 +290,10 @@ print_line(UNIT * uptr, int chan, int unit) /* Space printer */ if (outsel & PRINT_2) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n'); @@ -291,8 +303,10 @@ print_line(UNIT * uptr, int chan, int unit) if (outsel & PRINT_1) { while (uptr->u4 < (int32)uptr->capac) { - if (uptr->flags & UNIT_ATT) + if (uptr->flags & UNIT_ATT) { sim_fwrite("\r\n", 1, 2, uptr->fileref); + uptr->pos += 2; + } if (uptr->flags & ECHO) { sim_putchar('\r'); sim_putchar('\n');