[Simh] New to the List + Questions

Andru Luvisi luvisi at gmail.com
Tue Mar 8 12:53:27 EST 2011


Sorry if this is a dupe.  I tried to send this, and got a reject
notice from the list manager.  It doesn't like Perl attachments.  I'll
try just including the files in the message.

Also, it's cool to see that my mkdisttap.pl script has proved useful,
but embarrassing to see that my error in ending the file has been
duplicated so many times.  Somehow, I mistakenly believed that SIMH
ended tapes with two EOF markers in a row.  It actually ends tapes
with an FFFFFFFF marker.  See below for an example.  Fortunately,
since it's not common to read to the end of the tape, this doesn't
seem to have caused anyone any problems.

Andru

---------------------------------------------------------

I've gotten the root system to install and boot.  I shamelessly stole
the filesystem sizes and interleave numbers from the docs, without
trying to adjust them for the disk image I actually created.  I
haven't tried creating /usr and /sys yet.

I'm attaching a perl script for creating a bootable install tape
image, a simh initialization file, and my install log.

Andru

*** v7m.simh:

set tto 7b
set tu enabled
attach tu v7m.tap
attach rl system.dsk
boot tu

*** v7m.installlog.txt

$ dd if=/dev/zero of=system.dsk bs=1024k count=10
$ ./v7m.mkdisttap.pl > v7m.tap
$ pdp11 v7m.simh

PDP-11 simulator V3.7-0
Boot
: ht(0,3)
file sys size: 9600
interleave factor: 6
blocks per cylinder: 20
file system: rl(0,0)
isize = 3072
m/n = 6 20
Exit called
Boot
: ht(0,4)
Tape? ht(0,5)
Disk? rl(0,0)
Last chance before scribbling on disk.
End of tape
Boot
: rl(0,0)rl01htunix


unix/v7m 2.1

mem = 214400
#



*** v7m.mkdisttap.pl

#!/usr/bin/perl -w
use strict;

add_file("tapefile1", 512);
end_file();
add_file("tapefile2", 512);
end_file();
add_file("tapefile3", 512);
end_file();
add_file("tapefile4", 512);
end_file();
add_file("tapefile5", 512);
end_file();
add_file("tapefile6", 10240);
end_file();
add_file("tapefile7.tar", 10240);
end_file();
add_file("tapefile7.tar", 10240);
end_file();
end_tape();

sub end_file {
  print "\x00\x00\x00\x00";
}

sub end_tape {
  print "\xff\xff\xff\xff";
}

sub add_file {
  my($filename, $blocksize) = @_;
  my($block, $bytes_read, $length);

  open(FILE, $filename) || die("Can't open $filename: $!");
  while($bytes_read = read(FILE, $block, $blocksize)) {
    if($bytes_read < $blocksize) {
      $block .= "\x00" x ($blocksize - $bytes_read);
      $bytes_read = $blocksize;
    }
    $length = pack("V", $bytes_read);
    print $length, $block, $length;
  }
  close(FILE);
}



More information about the Simh mailing list