> The later M9301 (see disassembly of the contents here:
> http://ana-3.lcs.mit.edu/~jnc/tech/pdp11/M9301-YA.mac
> of one variant) didn't clear memory either
OK, so _my_ memory is failing! That code does in fact test the memory.
(Although, looking at it, I can't understand how it works; after writing the
contents of R3 into the memory section it it asked to test, it complements the
test value in R3, before comparing it with the memory it just wrote with R3,
to make sure they are the same. Maybe there's an error in the dis-assembly?)
Anyway, it should have left the memory mostly containing all 0's.
Noel
On 2016-01-24 19:01, Mark Longridge<cubexyz(a)gmail.com> wrote:
> Ok, I got a few questions about PDP-11.
>
> First, I was wondering when Bell Labs got that first PDP-11/20 what
> software (if any) came with it? I assume when one bought a PDP-11/20
> you would get some type of OS with it.
No. You might get diagnostics, but any kind of OS you would have to buy
separately, and there were several to choose from, depending on your needs.
> According to the folks at alt.sys.pdp11 the PDP-11 computer doesn't
> have anything equivalent to a PC's BIOS. But I know a bit about what a
> PC's BIOS does and that includes RAM Initialization. Wouldn't the DRAM
> on the PDP-11/something need to be initialized too? Perhaps an older
> PDP-11 doesn't have DRAM but surely the later models did?
RAM don't need to be initialized. Maybe you mean clearing it, so it
don't contain random information?
ECC memory, on the other hand needs to be initialized, but for those
PDP-11s who has that, the initialization is done in hardware.
> Now the last question has to do with what made the PDP-11 architecture
> so great. Part of that had to be the relatively affordablility of the
> PDP-11 and of course it was the machine that made Unix possible. It
> seems though that there should have been a PDP-11 based desktop and as
> far as I can tell that didn't happen. Instead we got a bunch of micros
> with 8080, z80 and 6502 cpus, but nothing that could run Unix, at
> least not a Unix v7 with source code.
The architecture is very easy to program on, and rather intuitive. You
have general registers, an orthogonal instruction set, and the machine
can be programmed as a stack based, a register based, or just plain
memory-to-memory style equally well.
In addition, I/O is pretty simple, as there are no special I/O
instructions. Same instructions as for anything else are also used for I/O.
Also, the memory model on the PDP-11 is pretty nice, with a proper MMU
which allows you to write reasonable OSes.
There were in fact desktop based PDP-11s, but DEC shot themselves in the
foot there. They were afraid of eating into their own business, so they
made the desktop PDP-11 incompatible in some ways with all other
PDP-11s, so you could in general not run much PDP-11 software on the
desktop, but had to develop specific programs for that platform. That,
and the fact that it took DEC too long to enter the market, meant that
the IBM PC had already become the standard by the time DEC came with the
Professional (the PDP-11 desktop).
DEC also made a couple of other PDP-11 based systems that were sortof
desktop, such as the VT-103, which was a VT100 with a PDP-11 inside.
Interesting idea, but the VT103 didn't have good mass storage, and had a
very slow and limited PDP-11 CPU. The PDT-11 was another attempt, with
similar issues as the VT-103.
If we were to examine prototype things, DEC did a lot more as well,
including a portable PDP-11 with an LCD display. Never became a product.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
> From: Mark Longridge
> when Bell Labs got that first PDP-11/20 what software (if any) came
> with it?
I have this bit set that they didn't get anything, they wrote a
cross-assembler on another machine. I know that when it came, it didn't have a
disk (wasn't ready yet), so it ran a chess problem (memory only) for quite a
while until the disk came. I think that's in the ACM paper, or if not, one of
the BSTJ Unix history papers.
> Perhaps an older PDP-11 doesn't have DRAM but surely the later models
> did?
MOS memory came in starting roughly around the time of the 11/04 and /34.
(Well, that's not quire right - there were bipolar and MOS memory options
for the 11/45, the second PDP-11 model, but they were kind of special.)
But the earliest ROM bootstraps were too small to have space for code to
clear memory, or anything like that. The diode-array BM792 ROM certainly
didn't.
The later M9301 (see disassembly of the contents here:
http://ana-3.lcs.mit.edu/~jnc/tech/pdp11/M9301-YA.mac
of one variant) didn't clear memory either, although there was probably room
in the ROMs by that point.
I suspect it didn't because nobody bothered with stuff like that back then -
you just wrote over whatever was already there. Properly written code would
never have referenced a location which had not been loaded or written to, that
way you couldn't get a parity error from random gubbish in semi-conductor at
power up (and of course core always had old data in it).
> Now the last question has to do with what made the PDP-11 architecture
> so great.
Bang/buck (in the metaphorical sense) ratio.
For a machine with a 16-bit word size (i.e. limited instruction size), it had
remarkable programming capability. Data could be in registers, pushed or
popped with a stack, at fixed addresses, PC-relative, indexed into a table,
etc, etc. And _all_ the instructions (basically) had acceess to _all_ those
modes.
As a result, the code density was probably higher than any similar sized
machine, and back when memory was core (i.e. expensive/limited), code density
was important.
The bus was also extremely flexible, given how simple it was: memory and
devices were all on the same (simple) bus.
> of course it was the machine that made Unix possible
I'd lay good money that the vast majority of PDP-11's never ran Unix. And
UNIX might have happened on some other machine - it's not crucially tied to
the PDP-11 - in fact, the ease with which it could be used on other machines
was a huge part of its eventual success.
> It seems though that there should have been a PDP-11 based desktop and
> as far as I can tell that didn't happen.
Because DEC were a bunch of losers. There's some DEC history book which talks
about DEC's multiple failures (on a variety of platforms, not just PDP-11
based ones) to get into the desktop market, if the title comes to me, I'll
post it.
Noel
---------- Forwarded message ----------
From: Clem Cole <clemc(a)ccc.com>
Date: Sat, Jan 23, 2016 at 3:00 PM
Subject: Re: [TUHS] Missing Documents for use with the Unix Time-Sharing
System, Sixth Edition
To: Will Senn <will.senn(a)gmail.com>
below....
On Sat, Jan 23, 2016 at 12:58 PM, Will Senn <will.senn(a)gmail.com> wrote:
> All,
>
> The Unix Sixth edition programmer's manual and other documents for use
> with Unix time-sharing system are available online, in html and postscript
> form from Wolfgang Helbig's site:
>
> http://wwwlehre.dhbw-stuttgart.de/~helbig/os/v6/doc/index.html
>
> There are papers some missing from the "Documents for use with the Unix
> Time-Sharing System":
>
​Hmm - these should be with the v6 distribution - some of them are coming
with later editions... and except for updates to said system will be go'nuf
That said you are asking about the versions from v6. I do not seem to
have hardcopies easy to find. I'll keep looking there is some stuff in my
attic.
​
> RATFOR - A Preprocessor for Rational Fortran
> NROFF User's Manual
> A Manual for Tmg Compiler-writing Language
>
​This is the doc that you might not find in other places, as I think tmg
stopped being distributed at some point. Doug as one of the authors I
believe may know the story. ​
> On the Security of UNIX
> The M6 Macro Processor
>
​I think you mean m4 not m6​
> A System for Typesetting Mathematics
> DC - An Interactive Desk Calculator
> BC - An Arbitrary Precision Desk-Calculator Language
> The Portable C Library (on UNIX)
> UNIX Summary
>
> Some of these are more interesting to me than others, but I tend towards
> shiny objects, so there is no telling when they will be of critical
> interest in the future. I have done quite a bit of searching for the NROFF
> document and the portable C library document and while I have found related
> works, I haven't come across the originals for sixth edition. Do any of
> y'all know where any or all of these documents are archived in their
> original/reproduced form?
Warren's V6 seems have many of them in:
http://www.tuhs.org/Archive/PDP-11/Distributions/research/Dennis_v6/v6doc.t…
> From: Will Senn
> I have cdb .. How do I exit it. %, CTRL-C, CTRL-D, CTRL-Z, Break,
> CTRL-Break, and so on just result in a ? being displayed.
CTL-D (EOF on input) works for me? Or maybe the version I have (it was a
binary only that came off the Shoppa disks, IIRC) is slightly different from
the one you have, and that only works in this version (which has a number of
extensions).
I don't think I ever found any other way to exit it. Although looking at the
code, it seems like probably the only way is to generate a 'quit with core
dump' interrupt - I forget what character that is in standard V6.
Noel
All,
The Unix Sixth edition programmer's manual and other documents for use
with Unix time-sharing system are available online, in html and
postscript form from Wolfgang Helbig's site:
http://wwwlehre.dhbw-stuttgart.de/~helbig/os/v6/doc/index.html
There are papers some missing from the "Documents for use with the Unix
Time-Sharing System":
RATFOR - A Preprocessor for Rational Fortran
NROFF User's Manual
A Manual for Tmg Compiler-writing Language
On the Security of UNIX
The M6 Macro Processor
A System for Typesetting Mathematics
DC - An Interactive Desk Calculator
BC - An Arbitrary Precision Desk-Calculator Language
The Portable C Library (on UNIX)
UNIX Summary
Some of these are more interesting to me than others, but I tend towards
shiny objects, so there is no telling when they will be of critical
interest in the future. I have done quite a bit of searching for the
NROFF document and the portable C library document and while I have
found related works, I haven't come across the originals for sixth
edition. Do any of y'all know where any or all of these documents are
archived in their original/reproduced form?
Regards,
Will
> From: Will Senn
> How did folks debug assembly routines in Unix v6, back in the day?
There are three different questions here, although you may not realize it:
- How did folks debug assembly routines in user programs in Unix v6
- How did folks debug assembly routines in the kernel in Unix v6
- How did folks debug assembly routines in PDP-11 standalone code created
with Unix v6
I did all three, and I used different methods for each.
For user code, there was no source-level debugger, so debugging C programs
and debugging code written in assembler were the same thing. I used 'adb'
(which is, stricly speaking, slightly post-V6 - our system at MIT was
actually sort of an early PWB clone), but V6 itself provides 'db' (and also,
IIRC, 'cdb'); all three are very similar.
For standalone code (in my case, a packet switch that ran on PDP-11's), I
used a version of DDT that was linked in with the rest of the code. The
original version was one in MACRO-11 which I inherited from Jim Mathis at
SRI, but I eventually re-wrote it in portable C, and it was used on the 68K,
uVax and 29K.
For kernel assembler code... I can't remember what I did! Although I wrote a
fair amount of it (I modified m45.s very extensively, to work with the Able
ENABLE card), so I must have done _something_, but I have no idea what. In
theory I could have linked DDT in with the kernel, but I don't think I ever
did so?
Recently I was debugging some kernel code (the splice() system call we were
discussing here), and I debugged it using... printf()'s! It was written in C,
but I don't really differentiate between debugging C code, and assembler.
> 2. No map file created by ld.
LD normally includes a symbol table in the output file, which 'nm' can dump.
> 3. No debugger that I can find.
See above.
> My workarounds include using OD to view the generated machine code
Use db/cdb/adb if you want to look at compiled code. Also, for 'cc', use the
-S flag.
Noel
All,
I'm finally returning to my study of v6 after digging a bit further into
assembly language and "other" pdp-11 operating systems. I even managed
to get hello, world working in assembly in v6 and interestingly enough,
I actually see how it works... for the most part :). Mini-note here:
http://decuser.blogspot.com/2016/01/hello-world-in-assembly-on-research.html
My question for y'all today is as follows (asked previously with a much
larger gap in understanding):
How did folks debug assembly routines in Unix v6, back in the day?
I realize that most folks didn't do assembly, but some did and I'm
curious what their approach might have been.
After having worked with RT-11 for a bit, I can see how I might develop
using RT-11 and then "port" a program across, but that seems less than
ideal. Here is my short list of missing features as I see them:
1. No listing file/cross reference list created by as.
2. No map file created by ld.
3. No debugger that I can find.
4. This is not a missing feature, but it deserves inclusion in the list,
the command as has possibly the most terse error messages I have ever
seen - B 12? Really? Thankfully, the awesome man command comes to the
rescue with the list of error codes.
My workarounds include using OD to view the generated machine code and
adding mesg calls.
Thoughts?
Will
All, I asked Peter Salus if there is an electronic version of his great
book "A Quarter Century of Unix". There isn't one, so I scanned my book
in. Peter has given TUHS the right to distribute the scanned version.
I've just added a link to the PDF of the scan here:
http://wiki.tuhs.org/doku.php?id=publications:quarter_century_of_unix
But, if you can, buy the paper version as well!
Many thanks to Peter for his generosity.
Cheers, Warren