1
0
mirror of https://github.com/aap/pdp6.git synced 2026-02-13 19:44:39 +00:00

commiting old changes

This commit is contained in:
aap
2016-04-03 23:07:12 +02:00
parent 475a10d136
commit b0bfdf7400
6 changed files with 639 additions and 43 deletions

14
mem.c
View File

@@ -7,6 +7,19 @@ word fmem[16];
word membus0, membus1;
word *hold;
void
initfmem(void)
{
FILE *f;
word w;
hword a;
if(f = fopen("fmem", "r"), f == NULL)
return;
for(a = 0; a < 16 && fscanf(f, "%lo", &w) != EOF; a++)
fmem[a] = w;
fclose(f);
}
void
initmem(void)
{
@@ -18,6 +31,7 @@ initmem(void)
for(a = 0; a < maxmem && fscanf(f, "%lo", &w) != EOF; a++)
memory[a] = w;
fclose(f);
initfmem();
}
void