mirror of
https://github.com/DoctorWkt/unix-jun72.git
synced 2026-01-27 04:32:48 +00:00
- move various notes files into notes directory.
This commit is contained in:
29
notes/TODO.txt
Normal file
29
notes/TODO.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
- can we get fpsym?
|
||||
- I don't see any mount utility in the s2 bits, we'll need one.
|
||||
- init does a mount, so we might not need one.
|
||||
- we should get the /usr stuff onto the rk03 disk and get it mounted
|
||||
- we should see how hard it is to get the serial ttys working.
|
||||
It sounds like getting a hack working in simh might not be too
|
||||
hard, but to get it integrated back in they probably want something
|
||||
robust. Perhaps having 1ed around will give someone the motivation
|
||||
to get dc11 support in simh?
|
||||
- I thought "as" wouldn't work, but it seems to be trying to run
|
||||
it. If possible we should investigate what is necessary to get
|
||||
the system to build its own kernel and its own tape.
|
||||
- we should investigate the original boot process and see how
|
||||
much of it would be possible to restore and determine if its
|
||||
worth the effort.
|
||||
- there's a bunch of file fragments in the 1972_stuff that might
|
||||
prove useful. It sounds like Warren has started to think about
|
||||
how to triage these. This might be a bit of effort.
|
||||
- modify kernel to run 2nd ed 0407 bins.
|
||||
- bootstrap Early_C_Compilers compiler to build itself as a
|
||||
2nd ed binary.
|
||||
|
||||
- at some point we should probably put together some kind of package
|
||||
for others who want to run the system in simh. I'm not really
|
||||
sure what this should look like and perhaps its a bit early to talk
|
||||
about it... Maybe two sets - a set of rf0 and rk0 images with
|
||||
a kernel that can run instantly, and a set with a cold kernel,
|
||||
a normal kernel and a tape image?
|
||||
|
||||
142
notes/machine.txt
Normal file
142
notes/machine.txt
Normal file
@@ -0,0 +1,142 @@
|
||||
Collection of notes on the hardware this should run on.
|
||||
|
||||
------------------
|
||||
device layout per u0 src:
|
||||
|
||||
address simh dev
|
||||
rk03/rk11 177400 disk RK
|
||||
dc11 174000 tty? (not supp?)
|
||||
tc11/tu56 177340 dec tape DTn (not showing up in simh?)
|
||||
rf11/rs11 177460 fixed head disk RF
|
||||
kw11-l 177546 clock CLK
|
||||
pc11 177550 paper tape PTR/PTP
|
||||
asr-33 177560 tty? TTI, TTO
|
||||
|
||||
|
||||
------------------
|
||||
man IV tap0 ... tap7 :
|
||||
"all eight files exist even though at present there are only two physical
|
||||
drives."
|
||||
|
||||
man IV tty
|
||||
claims that tty is treated differently than tty0..tty5 and implies
|
||||
that it is not used in multi-user mode. This may pose a problem
|
||||
if DC-11 is not supported.. we may only be able to run in single user
|
||||
mode.
|
||||
"By appropriate console switch settings, it is possible to cause UNIX
|
||||
to come up as a single-user system with I/O on this device."
|
||||
|
||||
man IV tty0 ... tty5
|
||||
says there are six tty devices. u0 srcs sets ntty to 8+1 (8 dc-11 plus
|
||||
one console?)
|
||||
|
||||
man V core
|
||||
"It is exactly 8192+64 bytes long" 8k of user core.
|
||||
this agrees with the definition of core in u0 as 4096 words long.
|
||||
This also lines up with the statement that there was 24k ram:
|
||||
u0 sets orig to 0, and core to 16k and ecore to 24k (core+8k).
|
||||
|
||||
------------------
|
||||
set rk3 enabled
|
||||
att rk3 rk3.dsk
|
||||
set rf enabled
|
||||
set cpu 11/20
|
||||
set cpu 32K ? there was really just 24k in the real machine
|
||||
|
||||
|
||||
-----------------------
|
||||
Disks:
|
||||
rf0 - 1024 blocks, always mounted, has root and swap.
|
||||
last 64 blocks (32kbyte) allocated to swap by u0.s
|
||||
u0.s can setup rudimentary fs on this if built with "cold=1"
|
||||
rk0 - 4871 blocks
|
||||
|
||||
|
||||
u0.s sets up rf0 as:
|
||||
|
||||
- superblock layout
|
||||
- free storage map contains 128 bytes
|
||||
- inode map contains 64 bytes
|
||||
|
||||
- allocate top 64 blocks "to unix" (960..1023)
|
||||
- allocate 17 blocks per process (nproc) (688..960 - 16 procs)
|
||||
- free blocks 687..34
|
||||
- zero out blocks 33..1 for use as inodes
|
||||
(and 2nd half of superblock which is unused?)
|
||||
|
||||
- for each special inode i-1 to i-40 initialize it
|
||||
- mode 100017 (allocated, read, write, other read, othe write)
|
||||
- num links = 1
|
||||
- uid = 1 (yup, not root)
|
||||
- fill in timestamp info
|
||||
|
||||
- write out premade i-nodes on i-41 .. i-47
|
||||
with premade directory data.
|
||||
i-41 root (with dev, bin, etc, usr, tmp)
|
||||
i-42 dev (with tty, ppt, mem, rf0, rk0, tap0 .. tap7, tty0..tty7, lpr, tty8)
|
||||
i-43 bin (empty)
|
||||
i-44 etc (with init)
|
||||
i-45 usr (empty)
|
||||
i-46 tmp (empty)
|
||||
i-47 init (binary, included in u0.s)
|
||||
special version that opens /dev/tap0 and reads files from it,
|
||||
creates them, chmods them and chowns them
|
||||
|
||||
special init:
|
||||
- seek to 65
|
||||
again:
|
||||
- read 512 bytes
|
||||
- use first word as size, if zero, break out of loop
|
||||
- call create with name at offset 4
|
||||
- call chmod with byte at offset 2
|
||||
- call chown with byte at offset 3
|
||||
- read 512 bytes from tape
|
||||
- write min(remaining len, 512) to disk
|
||||
- decrement remaining len and loop if more left
|
||||
- close file
|
||||
- loop to again
|
||||
|
||||
tape image format:
|
||||
|
||||
for each file:
|
||||
first block:
|
||||
size : word, zero for end
|
||||
mode : byte
|
||||
(setuid, exec, user read, user write, other read, other write)
|
||||
uid : byte
|
||||
name : 8 bytes
|
||||
followed by ((size+511) / 512) blocks of data.
|
||||
EOF is marked by zero length file.
|
||||
|
||||
|
||||
|
||||
|
||||
-----------------------
|
||||
cpu
|
||||
probably 11/20 with 24kb (or should that be 24k words = 48k?)
|
||||
could be 11/45 though.
|
||||
pdp-11 releases:
|
||||
1970: 11/20, 11/15
|
||||
1972: 11/40, 11/45, 11/05, 11/10
|
||||
1973: 11/35
|
||||
|
||||
"In 1971, when this manual was written, we had move off the original PDP-7
|
||||
to the PDP-11/20; it had 24KB of core memory, and no memory management
|
||||
hardware at all. "
|
||||
[...]
|
||||
"By this time we knew about the upcoming PDP-11/45, and had visited
|
||||
Digital in Maynard to talk about it; in particular, we had the specs
|
||||
for the floating-point instructions it supported. So the system
|
||||
described here included a simulator for the instructions (fptrap(III))."
|
||||
- http://www.cs.bell-labs.com/who/dmr/1stEdman.html
|
||||
(describing nov 3, 1971 manuals)
|
||||
|
||||
-------------------------------------
|
||||
section VII pg 5 has "boot procedures" section:
|
||||
http://cm.bell-labs.com/cm/cs/who/dmr/man71.pdf
|
||||
|
||||
------------------------------------
|
||||
http://en.wikipedia.org/wiki/PDP-11#PDP-11_instruction_repertoire
|
||||
|
||||
Has a reference on all the AS instructions in the PDP-11. This may come in
|
||||
handy while fixing the OCR text.
|
||||
269
notes/notes.txt
Normal file
269
notes/notes.txt
Normal file
@@ -0,0 +1,269 @@
|
||||
Original Source:
|
||||
http://www.bitsavers.org/pdf/bellLabs/unix/PreliminaryUnixImplementationDocument_Jun72.pdf
|
||||
|
||||
|
||||
------
|
||||
I started with the pdf, using Preview in mac I selected regions and
|
||||
copied and created new doc, saved it as jpeg and then used
|
||||
the online OCR program: http://asv.aso.ecei.tohoku.ac.jp/tesseract/
|
||||
I then manually edited each file.
|
||||
|
||||
The files are named according to the page index in the pdf and the
|
||||
section and page given in the page footer. Page headers and footers
|
||||
were not captured.
|
||||
------------------
|
||||
|
||||
e00-01 to e00-10 (10) - u0 -
|
||||
assigned: tim newsham, complete
|
||||
reviewed:
|
||||
e01-01 to e01-10 (10) - u1 -
|
||||
assigned: Hellwig Geisse
|
||||
reviewed:
|
||||
(reviewed e01-01 to e01-06 - tim newsham)
|
||||
e02-01 to e02-10 (10) - u2 -
|
||||
assigned: Brantley Coile, complete
|
||||
reviewed: tim newsham
|
||||
e03-01 to e03-04 (4) - u3 -
|
||||
assigned: Tim Bradshaw,
|
||||
(Brad Parker, complete)
|
||||
reviewed:
|
||||
e04-01 to e04-07 (7) - u4 -
|
||||
assigned: Alex Garbutt,
|
||||
(Brad Parker, complete)
|
||||
reviewed:
|
||||
e05-01 to e05-06 (6) - u5 -
|
||||
assigned: Ralph Logan, complete
|
||||
reviewed: johan beiser
|
||||
e06-01 to e06-06 (6) - u6 -
|
||||
assigned: johan beisser, complete
|
||||
reviewed:
|
||||
e07-01 to e07-08 (8) - u7 -
|
||||
assigned: Naoki Hamada, complete
|
||||
reviewed:
|
||||
e08-01 to e08-09 (9) - u8 -
|
||||
assigned: Christian David,
|
||||
(Brad Parker, complete)
|
||||
reviewed:
|
||||
e09-01 to e09-08 (8) - u9 -
|
||||
assigned: tim newsham, complete
|
||||
reviewed: Ralph Logan
|
||||
e10-01 to e10-02 (2) - ux -
|
||||
assigned: tim newsham, complete
|
||||
reviewed:
|
||||
e11-01 to e11-07 (7) - sh
|
||||
we have a binary for the sh already I think. this may be optional
|
||||
assigned: johan beisser, complete
|
||||
reviewed:
|
||||
e12-01 to e12-04 (4) - init
|
||||
we have a binary for init already
|
||||
assigned:
|
||||
reviewed:
|
||||
|
||||
|
||||
|
||||
------------------
|
||||
e00-01
|
||||
- I used spaces to line up the comment columns, not tabs. I
|
||||
picked the column distance arbitrarily.
|
||||
- the bottom section looks like it could be tabbed but my tabstops
|
||||
didnt line up with the values given so I used spaces
|
||||
|
||||
- (Brad Parker) removed commented out 3 lines at "4;4". The comment
|
||||
appears to be written in and is wrong (I think it might just be a
|
||||
stroke of the pen rather than a correction)
|
||||
|
||||
e00-02
|
||||
- I used tabs for the start of each asm command but not for the
|
||||
separation between mnemonic and arguments since these didnt line up.
|
||||
with my tab stops.
|
||||
|
||||
e00-03
|
||||
- left "dis addresses" typo in per original
|
||||
|
||||
e00-04
|
||||
- This instruction doesnt make sense: "dec r0 / r0=33.,...,1 "
|
||||
r0 is used as the jsr link register. However, r1 has the
|
||||
value of 34 prior to this. Changed both occurances of "r0" to
|
||||
"r1" in this code.
|
||||
|
||||
e00-05
|
||||
- cant tell if the "O" in quotes after 1: is a O or a 0.
|
||||
- left mispelled "mormally" in comment
|
||||
- left "file/etc/init" without space.
|
||||
|
||||
e00-06
|
||||
- left mis-spacing on 5: move r5,r1.
|
||||
|
||||
e00-10
|
||||
- left "/ect/init" typo
|
||||
- changed this to "/etc/init". There is no "/ect" directory
|
||||
on the rf0 drive at the point the cold init is run and
|
||||
the cold init program doesnt make any new directories, so
|
||||
this is likely just a typo in the original printout.
|
||||
|
||||
------
|
||||
e01-06
|
||||
- "r2, p pid-2(r1)" has written correction "p.ppid". Using written
|
||||
correction.
|
||||
- "mov $sysret1,(sp)" has written correction for "-(sp)". Using
|
||||
|
||||
--------------------
|
||||
e02-05
|
||||
- label "1:" is overstruck with "/" in the listing. leaving the
|
||||
label in place. Should be reviewed for semantic meaning.
|
||||
- the struck label is referenced below as "1b" right before
|
||||
"nig:" on e02-06. I believe removing the label would cause
|
||||
an extra comparison to occur but not change he semantics of
|
||||
the loop.
|
||||
e02-09
|
||||
- extra label "sysquit:" handwritten after "sysintr:". Leaving
|
||||
the extra label out.
|
||||
- adding it back in. this label is referenced in the syscall
|
||||
table (u1.s) but not defined elsewhere.
|
||||
e02-10
|
||||
- comment says "cdev has device =" it probably means "#" and could
|
||||
have just been a weak print of "#", but leaving as "=".
|
||||
|
||||
--------------------
|
||||
|
||||
e03-*
|
||||
- I used spaces to line up columns, not tabs.
|
||||
|
||||
--------------------
|
||||
|
||||
e04-*
|
||||
- I used spaces to line up columns, not tabs.
|
||||
|
||||
e04-06
|
||||
- comment seems to have "not equal" character in it (equals + slash);
|
||||
since my keyboard won't do that, I substituted "<>"
|
||||
|
||||
--------------------
|
||||
I noticed that "inode" and "i-node" were used interchangably, which could possibly
|
||||
indicate two different people commenting the code. I left each as the original.
|
||||
|
||||
e05-01
|
||||
- line 9 has a crossed out term, so i used the correction "r2"
|
||||
|
||||
e05-02
|
||||
- line 48 comment says "panic / found no tres storage" - left it as "tres"
|
||||
no idea whether it is supposed to be "tree", "free", or "tres"
|
||||
- reviewed, looks clearly "free", fixed.
|
||||
|
||||
e05-04
|
||||
- some of the latter parts of the code have comments "/ ?", left as is
|
||||
|
||||
e05-05
|
||||
- looks like some of the comments contain a "does not equal symbol" manually
|
||||
created by typing =<backspace>/. I symbolized it with "=/".
|
||||
--------------------
|
||||
e06:
|
||||
- Used tabs between sections of code instead of spaces.
|
||||
For example:
|
||||
bpn rtty0 / comment
|
||||
|
||||
This may need some review later. I'll go over it again this afternoon.
|
||||
--------------------
|
||||
I used spaces in all occasions because I did not fully understand
|
||||
where to put tabs. We can convert them easily by a small program
|
||||
if the rule is specified, so I leave them there.
|
||||
|
||||
e07-01
|
||||
- left "cmp r0,$4" as is. There is a write in correction
|
||||
for "r1" for "r0".
|
||||
- reviewed this, r1 has the character at this point and $4 is
|
||||
control-D. The write-in looks correct.
|
||||
- left "to" as is after ttych: There is a write in correction
|
||||
for "from" instead of "to".
|
||||
|
||||
e07-04
|
||||
- left "asr r0" as is. There is a write in correction
|
||||
for "r2" for "r0".
|
||||
- changed it to "r2". The comments clearly say "r2". The
|
||||
value comes from a call to "get" right before the call to
|
||||
this code ("put"), a page earlier inside the getc function.
|
||||
"r2" was previously multipled by 2 in get, so this divide
|
||||
by 2 makese sense to undo that.
|
||||
|
||||
e07-07
|
||||
- printout has: "mov $240.*$ps" but this is invalid syntax and
|
||||
there are other occurances where the "." is a comma. I'm
|
||||
changing this to be valid assembly -timnewsham.
|
||||
|
||||
e07-08
|
||||
- There is a handwritten addendum "super block" after the line
|
||||
"jsr r0, ppoke" which clarifies the comment.
|
||||
--------------------
|
||||
|
||||
e08-*
|
||||
- I used spaces to line up columns, not tabs.
|
||||
|
||||
e08-02
|
||||
- the bread function is missing a branch when copying data from
|
||||
kernel memory (r5) to user memory (r2). I added a branch:
|
||||
1: / r5 points to beginning of data in I/O buffer, r2 points to beginning
|
||||
/ of users data
|
||||
movb (r5)+,(r2)+ / move data from the I/O buffer
|
||||
dec r3 / to the user's area in core starting at u.base
|
||||
bne 1b
|
||||
^^^^^^^^^^^
|
||||
tst u.count / done
|
||||
beq 1f / yes, return
|
||||
without this it only copies one byte to userland.
|
||||
|
||||
--------------------
|
||||
e09-01
|
||||
- I'm using tabs between opcode and operands now
|
||||
- left "bic $!77,r1" although written comment says "? !177"
|
||||
- changing to "$!177". This is masking off the high bit of
|
||||
the received ascii character. shortly after this it compares
|
||||
with $177 (delete) so clearly its not supposed to mask off
|
||||
both hight bits ($!77). Also later in the other e09 pages
|
||||
similar operations are performed.
|
||||
e09-02
|
||||
- left "movb tty+38r0),r1" as is. There's a write in
|
||||
correction for "(" instead of "8". This concerns me as it
|
||||
means there are probably some errors in this listing as
|
||||
the paren is most likely the right character here.
|
||||
- fixed this to allow assembly to work.
|
||||
e09-03
|
||||
- hard to tell due to hand written correction, but I believe
|
||||
the line before "rts r0" reads "mov (sp)+,r0"
|
||||
- this makes sense since r0 is pushed onto the stack at the
|
||||
start of the function.
|
||||
- comment "ASC11" (one instead of I) left as is.
|
||||
e09-04
|
||||
- text comment says a label was lost! leaving it out for now.
|
||||
- adding it back. This looks like a switch table starting
|
||||
at the missing label (or actually one instruction before
|
||||
the label, weird that they wrote it this way).
|
||||
- correction "if count >=0" obscures original text in comment.
|
||||
no choice but to use new text.
|
||||
- "ASC11" sic
|
||||
e09-05
|
||||
- 5th to last "byte" line 2nd column is uneadable. pattern suggests
|
||||
the value "000"
|
||||
|
||||
--------------------
|
||||
e10-01
|
||||
e10-02
|
||||
- I used tabs for the first tab stop and spaced out to the next step.
|
||||
- Per discussions with Brantley Coile it appears that the origianl
|
||||
source probably used tabs, and that the printout has a tab stop
|
||||
after 8 characters and another after 7 characters. The spaces
|
||||
between opcode and operands are probably due to a tab, as can be
|
||||
seen in later assembly code we have in machine readable form.
|
||||
-------------------
|
||||
e11-01
|
||||
- I'm using a whole bunch of guesswork on some of these. Keystrokes
|
||||
are highly faded, and have to be guessed. The OCR utterly failed.
|
||||
e11-02
|
||||
- Line 15 has manual corrections, making it difficult to read what
|
||||
was added or subtracted.
|
||||
e11-03
|
||||
e11-04
|
||||
- First lines are horribly mangled. Guessed.
|
||||
- Line 7 has a typo, preserved
|
||||
- Line 8 has what resembles a "|", not sure if this is a screwup or
|
||||
not. Preserved, and assuming it's a "|".
|
||||
- line 21/22: I have no idea.
|
||||
98
notes/s2files.txt
Normal file
98
notes/s2files.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
This is an invetory of the s2 files that are incorporated into the
|
||||
system as compared to what files should be on a proper first edition
|
||||
system. Some files are missing, some files are borrowed from 2nd ed
|
||||
but present as 0405 binaries, and some files are 2nd ed binaries that
|
||||
the 1st ed kernel cannot run.
|
||||
|
||||
|
||||
/bin
|
||||
----
|
||||
: V2 cmd, 0405 binary
|
||||
ar
|
||||
as V2 binary
|
||||
b missing
|
||||
bas
|
||||
bcd missing
|
||||
boot missing
|
||||
cal
|
||||
cat
|
||||
cc V2 binary
|
||||
chball ? no idea
|
||||
check
|
||||
chmod
|
||||
chown
|
||||
cmp
|
||||
cp
|
||||
date
|
||||
db
|
||||
dbppt missing
|
||||
dc
|
||||
df
|
||||
ds V2 binary
|
||||
dsw
|
||||
ds V2 binary
|
||||
dsw
|
||||
dtf missing
|
||||
du
|
||||
echo V2 cmd, 0405 binary
|
||||
ed
|
||||
exit V2 cmd, 0405 binary
|
||||
fc V2 binary
|
||||
find V2 binary
|
||||
form
|
||||
goto V2 cmd, 0405 binary
|
||||
hup missing
|
||||
if V2 cmd, 0405 binary
|
||||
lbppt missing
|
||||
ld V2 binary
|
||||
ln
|
||||
login V2 cmd, 0405 binary
|
||||
ls
|
||||
mail
|
||||
maki V2 binary
|
||||
mesg
|
||||
mkdir
|
||||
mkfs
|
||||
mount
|
||||
mv
|
||||
nm V2 binary
|
||||
od
|
||||
pr
|
||||
rew
|
||||
rkd missing
|
||||
rkf missing
|
||||
rkl missing
|
||||
rm
|
||||
rmdir
|
||||
roff
|
||||
rmdir
|
||||
roff
|
||||
sdate missing
|
||||
sh
|
||||
size V2 binary
|
||||
skip ? no idea
|
||||
sort
|
||||
stat
|
||||
strip V2 binary
|
||||
stty V2 cmd, 0405 binary
|
||||
su
|
||||
sum
|
||||
tap
|
||||
tm
|
||||
tty
|
||||
type
|
||||
un V2 binary
|
||||
wc
|
||||
who
|
||||
write
|
||||
|
||||
/etc
|
||||
----
|
||||
as2 V2 binary
|
||||
getty V2 cmd, 0405 binary
|
||||
glob
|
||||
init
|
||||
msh
|
||||
suftab
|
||||
uids
|
||||
|
||||
Reference in New Issue
Block a user