mirror of
https://github.com/open-simh/simh.git
synced 2026-05-03 06:39:03 +00:00
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:
@@ -197,11 +197,11 @@ for (;;) {
|
|||||||
csum = origin = field = newf = 0; /* init */
|
csum = origin = field = newf = 0; /* init */
|
||||||
do { /* skip leader */
|
do { /* skip leader */
|
||||||
if ((hi = sim_bin_getc (fi, &newf)) == EOF)
|
if ((hi = sim_bin_getc (fi, &newf)) == EOF)
|
||||||
if (sections_read != 0) {
|
if (sections_read != 0) {
|
||||||
printf ("%d sections sucessfully read\n\r", sections_read);
|
printf ("%d sections sucessfully read\n\r", sections_read);
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
} else
|
} else
|
||||||
return SCPE_FMT;
|
return SCPE_FMT;
|
||||||
} while ((hi == 0) || (hi >= 0200));
|
} while ((hi == 0) || (hi >= 0200));
|
||||||
for (;;) { /* data blocks */
|
for (;;) { /* data blocks */
|
||||||
if ((lo = sim_bin_getc (fi, &newf)) == EOF) /* low char */
|
if ((lo = sim_bin_getc (fi, &newf)) == EOF) /* low char */
|
||||||
@@ -213,9 +213,11 @@ for (;;) {
|
|||||||
if (hi == 0200) { /* end of tape? */
|
if (hi == 0200) { /* end of tape? */
|
||||||
if ((csum - wd) & 07777) { /* valid csum? */
|
if ((csum - wd) & 07777) { /* valid csum? */
|
||||||
if (sections_read != 0)
|
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;
|
return SCPE_CSUM;
|
||||||
}
|
}
|
||||||
|
if (!(sim_switches & SWMASK ('A'))) /* Load all sections? */
|
||||||
|
return SCPE_OK;
|
||||||
sections_read++;
|
sections_read++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
doc/pdp8_doc.doc
BIN
doc/pdp8_doc.doc
Binary file not shown.
Reference in New Issue
Block a user