if you hadn't already known this about the PDP-8

From: Bill McDermith <bill_mcdermith_at_yahoo.com>
Date: Thu Dec 13 15:03:13 2001

Perhaps today when you can pack arbitrarily large amounts of
hardware on a chip, memory is (practically) free, we (mostly) all
have internet connections, disks are gigantic, and computer
systems are cheap (er, inexpensive), it's hard to understand the
pdp-8 and contemporary computers... ;-)

Gunther Schadow wrote:

> I found this really interesting: The PDP-8 has no concept of a
> stack. It does have sub-routines though. Instead of pushing the
> instruction pointer onto a stack, it's being written at the
> location to which the call is directed (first address of the
> subroutine). Then a return is simply an indirect jump to that
> first address of the subroutine.

Actually, most machines from this era used this method or something
like it... The CDC6000s actually stored a branch to the return
address in the first word of the subroutine.

You can, of course, implement stacked subroutine calls in
a pdp-8... This sort of thing was generally left as an exercise
to the student (I was one of those around that time... :-)

As an interesting side note, from my understanding, the MIPS
processor doesn't have a stack in the same way as the pdp-8
doesn't -- it has to be implemented "by hand", with stores
through a register (stack pointer) with the register incremented
or decremented... Of course, the MIPS has registers (note the
plural), while the pdp-8 has an accumulator.

> This is hillarious! Wasn't the notion of a stack arond already
> before 1965?

Sure, the notion was around, look in Fundamental Algorithms
(Knuth,1968, a reference I still have on my desk...)
Stacks were mostly implemented in FORTRAN arrays, along
with linked lists and other "modern" data structures... :-)

I guess, after spending so much time programming those things, I had
missed the "hilarious" aspect of it... :-)

> The coolest thing is that inspite of this "unique" way of handling
> subroutines, the PDP-8 had a timesharing system TSS-8. I suppose
> they could not share code segments then, so if three users were
> doing FOCAL, they would have 3 instances of the FOCAL code in
> memory (or swapping in and out to disk.) And all this at maximally
> 32 kB of memory! Amazing.

Oh, and look at all the other suffering! Those three "users" on asr33
teletypes running at 110 baud, saving their programs on paper tape,
reading those programs through the reader on the tty, and splicing
the tape! The hours spent playing games like lunar lander, with its
wonderful tty graphics! A huge program was a box of cards (2000
as I remember... :-)
And the -- oh, oh, sorry, pardon the nostalgia trip... <grin>

In a sense, the hp2000c timesharing system did have "shared code
segments", in the sense that the whole time sharing system was a
basic interpreter with a file system/command processor tacked on,
so all the users (32 max, as I recall, it you has both multiplexors
in the 2114 communications processor...) shared the same "code".
The user area was swapped...

> I just wonder how the kernel calls were handled. The kernel was
> called "Monitor." That may be the revealing piece of it: perhaps
> the Monitor was a monitor, so only one thread could ever execute
> any of the monitor's code at the same time.

Kernel?!!? We don't need no stinking kernel!
Real programmers read and write directly to the devices!
(Or just use the switch register!)
Operating system, Bah, Humbug! :-)

> That raises a last question: what was first, the TSS-8 kernel
> called "Monitor" or the operating system technical term "monitor"?
> Dijkstra's classic semaphore paper was back in 1968, and my "new"
> Introduction to Programming book is printed 1968 too. AFAIK
> the monitor construct is younger than the semaphore, right? So,
> could it be that the technical term "monitor" comes from taking the
> functioning of the TSS-8 kernel as a paradigma?

The 7090 and 7094 at MIT in 1963 were controlled by the FORTRAN
Monitor System ( http://www.multicians.org/thvv/7094.html ), so the use
of monitor as this type of term goes back at least that far... The first ref

that I found to semaphores is Dijkstra in 1968, but it seems to me that the
term was in use before that...
(Other than in connection with signal flags and railroad signals, etc.
And monitors? heavily armored gunboats around Civil War time,
I believe... Named after the prototype...)

> fun stuff, isn't it?
> -Gunther

I would have to echo the comment by Fredrick P. Brooks, Jr., from
the Epilogue of the new revision of his classic book,
"The Mythical Man-Month":

"To only a fraction of the whole human race does God give the privilege
of earning one's bread doing what one would have gladly pursued for
free, for passion. I am very thankful." (Page 291)

After doing this for nearly thirty years, I still can't believe I'm getting
_paid_ to do this. Yes, I'd have to say it is fun, both looking back
and in the larger sense...

> PS: I think one could emulate something like a stack on the
> PDP-8 using the auto-increment registers in the PDP-8's zero
> page. Of course it would work without them, but it may make
> the one of the operations push or pop more efficient...
>
> --
> Gunther Schadow, M.D., Ph.D. gschadow_at_regenstrief.org
> Medical Information Scientist Regenstrief Institute for Health Care
> Adjunct Assistant Professor Indiana University School of Medicine
> tel:1(317)630-7960 http://aurora.regenstrief.org


_________________________________________________________
Do You Yahoo!?
Get your free _at_yahoo.com address at http://mail.yahoo.com
Received on Thu Dec 13 2001 - 15:03:13 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:38 BST