Skip to content

Commit

Permalink
PDP11: Enhance LOAD command to be able to load from an in host memory…
Browse files Browse the repository at this point in the history
… image.
  • Loading branch information
markpizz committed Jan 11, 2016
1 parent ab8123e commit 542b2cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PDP11/pdp11_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ if ((*cptr != 0) || (flag != 0))
do { /* block loop */
csum = 0; /* init checksum */
for (i = 0; i < 6; ) { /* 6 char header */
if ((c[i] = getc (fileref)) == EOF)
if ((c[i] = Fgetc (fileref)) == EOF)
return SCPE_FMT;
if ((i != 0) || (c[i] == 1)) /* 1st must be 1 */
csum = csum + c[i++]; /* add into csum */
Expand All @@ -263,7 +263,7 @@ do { /* block loop */
return SCPE_OK;
}
for (i = 6; i < cnt; i++) { /* exclude hdr */
if ((d = getc (fileref)) == EOF) /* data char */
if ((d = Fgetc (fileref)) == EOF) /* data char */
return SCPE_FMT;
csum = csum + d; /* add into csum */
if (org >= MEMSIZE) /* invalid addr? */
Expand All @@ -273,7 +273,7 @@ do { /* block loop */
(M[org >> 1] & 0177400) | (uint16)d;
org = (org + 1) & 0177777; /* inc origin */
}
if ((d = getc (fileref)) == EOF) /* get csum */
if ((d = Fgetc (fileref)) == EOF) /* get csum */
return SCPE_FMT;
csum = csum + d; /* add in */
} while ((csum & 0377) == 0); /* result mbz */
Expand Down

0 comments on commit 542b2cb

Please sign in to comment.