PDP8: Revised fix for Binary loader can't read multiple section tapes (#74) to make reading all sections optional based on the -A switch (from Dave Gesswein)

This commit is contained in:
Mark Pizzolato 2014-02-11 18:58:19 -08:00
parent 9068ea0e8e
commit 519f7f2c03
2 changed files with 9 additions and 7 deletions

View file

@ -197,11 +197,11 @@ for (;;) {
csum = origin = field = newf = 0; /* init */
do { /* skip leader */
if ((hi = sim_bin_getc (fi, &newf)) == EOF)
if (sections_read != 0) {
printf ("%d sections sucessfully read\n\r", sections_read);
return SCPE_OK;
} else
return SCPE_FMT;
if (sections_read != 0) {
printf ("%d sections sucessfully read\n\r", sections_read);
return SCPE_OK;
} else
return SCPE_FMT;
} while ((hi == 0) || (hi >= 0200));
for (;;) { /* data blocks */
if ((lo = sim_bin_getc (fi, &newf)) == EOF) /* low char */
@ -213,9 +213,11 @@ for (;;) {
if (hi == 0200) { /* end of tape? */
if ((csum - wd) & 07777) { /* valid csum? */
if (sections_read != 0)
printf ("%d sections sucessfully read\n\r", sections_read);
printf ("%d sections sucessfully read\n\r", sections_read);
return SCPE_CSUM;
}
}
if (!(sim_switches & SWMASK ('A'))) /* Load all sections? */
return SCPE_OK;
sections_read++;
break;
}

Binary file not shown.