Yes, the calling sequence changes were in the back of my mind, but
fortunately the TUHS source archives allowed me to easily look at the
kernel source to see how the arguments were passed. Somewhere between
2.8 and 2.11 they changed it. Again, 2.11 was one fo the first attempts
to formalize a true "multi platform" kernel rather than just copying over
the kernel and reworking it for a new machine from a seperate source
"tree."
Yes, your code takes the return of the write system call and uses it as
the exit code. Not that it makes too much difference. My 2.11 version
of your code passes a zero explicitly.
Amusingly, speaking of college courses. I had early on joined the UNIX
systems programming team at JHU and had also done some custom work for
various PDP-11 sites on campus (DOS/BATCH, RT-11, etc...). PDP-11
assembler was something I knew well. The head of the EE department told
me he'd be very disappointed if I actually signed up for his PDP-11
assembler programming course my senior year. Oddly, this caused some
consternation with the faculty committee approving my graduation as I
hadn't taken it and it was required.
Our department UNIX machine as a PDP-11/45 running a high modified V6
kernel. I also got one of the early 11/23's and we brought up the same
software on that. A year after I graduated, I was attending a DEC
announcement on the T-11 (I think the first single chip PDP-11). The
speaker says it had all the instructions with the exception of MARK. Me
and one other guy are going, "What? No MARK instruction?" MARK was
the most useless instruction concocted and it wouldn't even work on an
executable that was set up split I/D.