[Simh] ALTAIR thinko?

Bailey, Scott scott.bailey at hp.com
Mon Feb 2 10:16:23 EST 2015


I've never seen an ALTAIR (beyond the Popular Science cover!) or used the emulated simh version, but I was reading code for edification and came across this statement in altair_cpu.c:

   3. Non-existent memory.  On the 8080, reads to non-existent memory
      return 0377, and writes are ignored.  In the simulator, the
      largest possible memory is instantiated and initialized to zero.
      Thus, only writes need be checked against actual memory size.

This looks like boilerplate copied from other simulators. Sure enough, later on, I find:

for (i = MEMSIZE; i < MAXMEMSIZE; i++) M[i] = 0;

However, if the statement above regarding 8080 behavior is correct, and I have no idea if it is, shouldn't that line be:

for (i = MEMSIZE; i < MAXMEMSIZE; i++) M[i] = 0377;

to preserve accuracy of the simulator?

FWIW,
Scott Bailey
scott.bailey at hp.com


More information about the Simh mailing list