From 02fdb12af9fe140f2e8a5d682556a5416db70a0d Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Sun, 22 Mar 2020 15:05:46 -0400 Subject: [PATCH] KA10: Fixed attach -a option. --- PDP10/kx10_dt.c | 1 + PDP10/pdp6_dtc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/PDP10/kx10_dt.c b/PDP10/kx10_dt.c index 449e788..0e82c56 100644 --- a/PDP10/kx10_dt.c +++ b/PDP10/kx10_dt.c @@ -1182,6 +1182,7 @@ t_stat dt_attach (UNIT *uptr, CONST char *cptr) sim_printf ("16b format"); else sim_printf ("18b/36b format"); sim_printf (", buffering file in memory\n"); + (void)sim_fseek (uptr->fileref, 0, SEEK_SET); /* start at the beginning of file */ uptr->io_flush = dt_flush; if (uptr->flags & UNIT_8FMT) { /* 12b? */ for (ba = 0; ba < uptr->capac; ) { /* loop thru file */ diff --git a/PDP10/pdp6_dtc.c b/PDP10/pdp6_dtc.c index c4e1567..4ad93c9 100644 --- a/PDP10/pdp6_dtc.c +++ b/PDP10/pdp6_dtc.c @@ -1194,6 +1194,7 @@ dtc_attach (UNIT *uptr, CONST char *cptr) sim_printf ("16b format"); else sim_printf ("18b/36b format"); sim_printf (", buffering file in memory\n"); + (void)sim_fseek (uptr->fileref, 0, SEEK_SET); /* start at the beginning of file */ uptr->WRITTEN = 0; uptr->io_flush = dtc_flush; if (uptr->flags & UNIT_8FMT) { /* 12b? */