From 721a16f7e91b69005692fcf37375485575c6b372 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 18 Sep 2013 11:13:39 -0700 Subject: [PATCH] PDP8: Fix LOAD command ignores field change immediately after leader. (#73). From Bob Supnik and David Gesswein. --- PDP8/pdp8_sys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PDP8/pdp8_sys.c b/PDP8/pdp8_sys.c index 20eba5ec..1f5ddc1a 100644 --- a/PDP8/pdp8_sys.c +++ b/PDP8/pdp8_sys.c @@ -1,6 +1,6 @@ /* pdp8_sys.c: PDP-8 simulator interface - Copyright (c) 1993-2011, Robert M Supnik + Copyright (c) 1993-2013, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -23,6 +23,7 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. + 17-Sep-13 RMS Fixed recognition of initial field change (Dave Gesswein) 24-Mar-09 RMS Added link to FPP 24-Jun-08 RMS Fixed bug in new rim loader (Don North) 24-May-08 RMS Fixed signed/unsigned declaration inconsistency @@ -190,11 +191,11 @@ t_stat sim_load_bin (FILE *fi) int32 hi, lo, wd, csum, t; uint32 field, newf, origin; +csum = origin = field = newf = 0; /* init */ do { /* skip leader */ if ((hi = sim_bin_getc (fi, &newf)) == EOF) return SCPE_FMT; } while ((hi == 0) || (hi >= 0200)); -csum = origin = field = newf = 0; /* init */ for (;;) { /* data blocks */ if ((lo = sim_bin_getc (fi, &newf)) == EOF) /* low char */ return SCPE_FMT;