summaryrefslogtreecommitdiff
path: root/as/genbin.c
diff options
context:
space:
mode:
Diffstat (limited to 'as/genbin.c')
-rw-r--r--as/genbin.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/as/genbin.c b/as/genbin.c
index 377c6bf..887c921 100644
--- a/as/genbin.c
+++ b/as/genbin.c
@@ -213,18 +213,22 @@ opcode_pt ch;
else
#endif
{
+#ifdef MSDOS
+static PT zapptr = 0;
+#endif
outfd = binfil;
- if( binfbuf != (PT)binmbuf)
- if( lseek(binfil, (long)((PT)binmbuf-binfbuf), 1) < 0 )
- error(BWRAP);
- binfbuf = binmbuf;
-#if 0
- while (binfbuf < (PT)binmbuf)
+#ifdef MSDOS
+ while (binfbuf < (PT)binmbuf && binfbuf >= zapptr+binmin)
{
- writec(0x0);/* pad with nulls if file buffer behind */
+ writec(0);
++binfbuf;
+ ++zapptr;
}
#endif
+ if( binfbuf != (PT)binmbuf)
+ if( lseek(binfil, (long)((PT)binmbuf-binfbuf), 1) < 0 )
+ error(BWRAP);
+ binfbuf = binmbuf;
writec(ch);
binmbuf = ++binfbuf;
}