mirror of
https://github.com/DoctorWkt/pdp7-unix.git
synced 2026-05-04 15:15:48 +00:00
Moved proto and password to build/
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
ken:ken:ken:12
|
||||
dmr:dmr:dmr:14
|
||||
44
tools/proto
44
tools/proto
@@ -1,44 +0,0 @@
|
||||
# Prototype file for PDP-7 Unix filesystem layout
|
||||
#
|
||||
# Entries are one of:
|
||||
# filename f[r-][w-][r-][r-] uid local_file_to_insert
|
||||
# dirname d[r-][w-][r-][r-] uid [inumber]
|
||||
# device i[r-][w-][r-][r-] uid inumber
|
||||
# link l---- inumber
|
||||
#
|
||||
# The top directory's name is ignored
|
||||
# Numeric values are in decimal
|
||||
# Contents of each directory ends with a $ on a line by itself
|
||||
# Format was inspired by 6th Edition mkfs
|
||||
#
|
||||
dd drw-- -1 2
|
||||
system drw-- -1 3
|
||||
init frwr- -1 ../bin/init
|
||||
password frw-- -1 password
|
||||
ttyin irwr- -1 6
|
||||
keyboard irwr- -1 7
|
||||
pptin irwr- -1 8
|
||||
ttyout irwr- -1 10
|
||||
display irwr- -1 11
|
||||
pptout irwr- -1 12
|
||||
sh frwr- -1 ../bin/sh
|
||||
$
|
||||
|
||||
as frwr- -1 ../bin/as
|
||||
cat frwr- -1 ../bin/cat
|
||||
chmod frwr- -1 ../bin/chmod
|
||||
chown frwr- -1 ../bin/chown
|
||||
chrm frwr- -1 ../bin/chrm
|
||||
cp frwr- -1 ../bin/cp
|
||||
date frwr- -1 ../bin/date
|
||||
ds frwr- -1 ../bin/ds
|
||||
ln frwr- -1 ../bin/ln
|
||||
ls frwr- -1 ../bin/ls
|
||||
mv frwr- -1 ../bin/mv
|
||||
stat frwr- -1 ../bin/stat
|
||||
ken drwr- 10
|
||||
system l---- 3
|
||||
$
|
||||
dmr drwr- 12
|
||||
system l---- 3
|
||||
$
|
||||
46
tools/sdump
Executable file
46
tools/sdump
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# sdump: Dump the contents of a filesystem in SimH format
|
||||
#
|
||||
# (c) 2016 Warren Toomey, GPL3
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
### read a word from a file in SimH format
|
||||
### return -1 on EOF
|
||||
sub read_word {
|
||||
my $F = shift;
|
||||
# Convert four bytes into one 18-bit word
|
||||
return -1 if ( read( $F, my $four, 4 ) != 4 ); # Not enough bytes read
|
||||
my ( $b1, $b2, $b3, $b4 ) = unpack( "CCCC", $four );
|
||||
return ((($b1 & 0xff) << 24 ) |
|
||||
(($b2 & 0xff) << 16 ) |
|
||||
(($b3 & 0xff) << 8) |
|
||||
($b4 & 0xff));
|
||||
}
|
||||
|
||||
### Main program
|
||||
die("Usage: $0 imagefile\n") if (@ARGV!=1);
|
||||
|
||||
open(my $IN, "<", $ARGV[0]) || die("Couldn't open $ARGV[0]: $!\n");
|
||||
|
||||
use constant NUMBLOCKS => 8000; # Number of blocks on a surface
|
||||
use constant WORDSPERBLK => 64; # 64 words per block
|
||||
|
||||
foreach my $blocknum ( 0 .. NUMBLOCKS*2 - 1 ) {
|
||||
printf("Block %d (%06o)\n", $blocknum, $blocknum );
|
||||
foreach my $line ( 0 .. 7 ) {
|
||||
|
||||
# Print out the words in octal
|
||||
foreach my $offset ( 0 .. 7 ) {
|
||||
# Get a word
|
||||
my $word= read_word($IN);
|
||||
exit(0) if ($word==-1);
|
||||
printf("%06o ", $word);
|
||||
}
|
||||
print("\n");
|
||||
}
|
||||
print("\n");
|
||||
}
|
||||
exit(0);
|
||||
Reference in New Issue
Block a user