Tape endianness in Bob's simulator

Robin Birch robin at falstaf.demon.co.uk
Wed Dec 30 22:28:31 AEST 1998


In message <199812300006.QAA12964 at moe.2bsd.com>, Steven M. Schultz
<sms at moe.2bsd.com> writes
>       I know I've read simulated tape files on an Intel system with no
>       trouble - so it would appear that the endianness was correct.
>
>       Good Luck Robin! ;)
>
>       Steven
Steven,
I now have a makesimtape that creates the bootstrap files correctly.  I
have found, I think, one bug and partly rewritten another bit just to
put my mind at rest about a couple of things.  I still can't create the
root correctly though.

What I have found:

1) Your endianness is correct, it took me a couple of sample programs
and rewrites to prove it.  In doing this I have replaced trl with
another bit of code that does the same thing but is easier to play
around with to change the byte orders.

2) There are two bugs in the use of writev.  These are:

2.1) When writing the headers and data you are writing a long to the
file where iovec only supports (I think) an unsigned short.
2.2) When writing the tape marks you are writing an integer as though it
was a long.

Of the two 2.2 is the most significant (I think).

After correcting both of these.  By changing zero from an int to a long
and by replacing the writevs with writes for the headers, data and
trailers I have a version of makesimtape that creates a bootstrap file
that works.

I can load and run all of the bootstrap programs as though I was looking
at a real pdp which I couldn't before. This makes me think that I have
probably got makesimtape about right.

Now for the bad bit.  I have created a root.dump then run it through
makesimtape with the command file:

/usr/root.dump 2
* 1

and it won't load from restor.  I get a succession of "missing address
(header) block" errors but I successfully detect the end of the tape and
restor stops running, as it is supposed to do.

So, am I doing something wrong in creating the root file? or is there
something still wrong with makesimtape?.  This is probably a red herring
but the distribution tapes are written with a blocksize of 20 for all of
the data after the bootstraps whilst makesimtape only writes multiples
of 512.

Advice please

Robin
____________________________________________________________________
Robin Birch     robin at falstaf.demon.co.uk

M1ASU/2E0ARJ    Old computers and radios always welcome

Received: (from major at localhost)
	by minnie.cs.adfa.edu.au (8.9.1/8.9.1) id CAA17289
	for pups-liszt; Thu, 31 Dec 1998 02:53:20 +1100 (EST)


More information about the TUHS mailing list