Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's)) 
Author Message
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))


Quote:

>- In that era (780 was announced around 1976, so the design was
>  c.1974), most compilers weren't as smart as they are today.
>    (Up to c.1980 DEC's PDP-11 fortran still generated
>    threaded code.  (Can you say "a factor of 3 performance
>    hit?" :( :( )

I remember that! It was cute, I could write Forth that would kick Fortran's
pants, even though FIG-Forth had an extra indirection in it's interpreter.

IIRC, Fortran used:

        JMP (R1)+

And Forth used:

        MOV (R5)+,R4
        JMP (R4)+

I think the big difference was Forth had more complex primitives that got
more work done per trip through the interpreter.

It was CISCier.

--

 `-_-'   Ar rug t barrg ar do mhactre inniu?
  'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd



Sun, 18 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:
> I remember that! It was cute, I could write Forth that would kick Fortran's
> pants, even though FIG-Forth had an extra indirection in it's interpreter.

> IIRC, Fortran used:

>    JMP (R1)+

It's been a long time, but didn't the use of threaded code allow them to
squeeze more code into the machine? Some of the Fortran programs from
mainframe land were fairly large.

The only actual contact I had with that stuff was with the DECUS version
of PDP-11 Adventure, which was written in that Fortran. Even with the
threading, it needed an overlay as well. I got into the guts of it because
I made it run under early UNIX on a PDP-11. (Emulate the RT-11 traps).

Quote:
> I think the big difference was Forth had more complex primitives that got
> more work done per trip through the interpreter.

Could be. There were Fortran ones for file I/O, but I also recall there
being some real code intermixed with the threaded stuff. I could be
mistaken, however.

--
[Don't design inefficiency in - it'll come in the implementation]

Myrias Software Corp.   (780) 435-1000  http://www.myrias.com



Sun, 18 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))


Quote:
>IIRC, Fortran used:

>    JMP (R1)+

>And Forth used:

>    MOV (R5)+,R4
>    JMP (R4)+

IDRC, it seems, that should be:


and

        MOV     (R5)+,R4

--

 `-_-'   Ar rug t barrg ar do mhactre inniu?
  'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd



Sun, 18 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:


>> I remember that! It was cute, I could write Forth that would kick Fortran's
>> pants, even though FIG-Forth had an extra indirection in it's interpreter.

>> IIRC, Fortran used:

>>        JMP (R1)+

        ...

Quote:
>> I think the big difference was Forth had more complex primitives that got
>> more work done per trip through the interpreter.
>Could be. There were Fortran ones for file I/O, but I also recall there
>being some real code intermixed with the threaded stuff. I could be
>mistaken, however.

Correct.  Lots of fun to debug, but so was everything else those days.

--
-------------------------------------------------------------------------

-------------------------------------------------------------------------



Sun, 18 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:

>Correct.  Lots of fun to debug, but so was everything else those days.

(long nostalgic sigh)

I'm still looking for an -11 with a front panel.

--

 `-_-'   Ar rug t barrg ar do mhactre inniu?
  'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd



Sun, 18 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:
>(long nostalgic sigh)
>I'm still looking for an -11 with a front panel.

I just have to pipe in for the benefit of the kids...  The front panel
was a row of 16 switches adorned with 16 LEDs; a special bus address gave
the switches value as a word when read, and showed a word's value on the
LED when written.  (UNIX V6 had a system call (csw) which did that).

Most OSes used to read the switches value during the idle loop, interpret
it as an address, and show its contents in lights.  This was a great
debugging tool, and also a contest among OSes which would put up the most
impressive light pattern!

--
        Amos Shapir
Paper: nSOF Parallel Software, Ltd.
       Givat-Hashlosha 48800, Israel
Tel: +972 3 9388551   Fax: +972 3 9388552        GEO: 34 55 15 E / 32 05 52 N



Fri, 23 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:

>I just have to pipe in for the benefit of the kids...  The front panel
>was a row of 16 switches adorned with 16 LEDs; a special bus address gave
>the switches value as a word when read, and showed a word's value on the
>LED when written.  (UNIX V6 had a system call (csw) which did that).

That's not a real front panel.  A real front panel has switches and lights
for address and data, and would let you examine or change memory as you
liked.  They were particularly useful on machines with no boot ROM - you'd
toggle in a short program that loads programs from tape, then press the RUN
button.

John West



Fri, 23 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:


>>(long nostalgic sigh)
>>I'm still looking for an -11 with a front panel.
>I just have to pipe in for the benefit of the kids...  The front panel
>was a row of 16 switches adorned with 16 LEDs; a special bus address gave
>the switches value as a word when read, and showed a word's value on the
>LED when written.  (UNIX V6 had a system call (csw) which did that).
>Most OSes used to read the switches value during the idle loop, interpret
>it as an address, and show its contents in lights.  This was a great
>debugging tool, and also a contest among OSes which would put up the most
>impressive light pattern!

You cannot top BESM-6 on that... Its front panel was full of neon lights
which reflected bits in GPRs (called "index registers"). Users wrote FORTRAN
programs which displayed love messages to pretty night operators,
scrolling as ticker!

http://www.mailcom.com/besm6/

--Pete



Fri, 23 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))
Excuse me,  but the PDP-11 had a real front panel.  I clearly remember
keying in the bootstrap commands and then loading my paper tape in the
reader.  Dectapes were for sissies -- real programmers used paper tape and
nothing but paper tape  ;-)  and those of us who were either {*filter*}s or
had low budgets used the paper tape reader on the TTY-33 instead of Dec's
high speed paper tape reader.

regards

Jerry Gitomer
--------------------------------------------------------

Quote:

>>I just have to pipe in for the benefit of the kids...  The front panel
>>was a row of 16 switches adorned with 16 LEDs; a special bus address gave
>>the switches value as a word when read, and showed a word's value on the
>>LED when written.  (UNIX V6 had a system call (csw) which did that).

>That's not a real front panel.  A real front panel has switches and lights
>for address and data, and would let you examine or change memory as you
>liked.  They were particularly useful on machines with no boot ROM - you'd
>toggle in a short program that loads programs from tape, then press the RUN
>button.

>John West



Fri, 23 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))
Quote:

> Excuse me,  but the PDP-11 had a real front panel.  I clearly remember
> keying in the bootstrap commands and then loading my paper tape in the
> reader.  Dectapes were for sissies -- real programmers used paper tape and
> nothing but paper tape  ;-)  and those of us who were either {*filter*}s or
> had low budgets used the paper tape reader on the TTY-33 instead of Dec's
> high speed paper tape reader.

> regards

> Jerry Gitomer
> --------------------------------------------------------



> >>I just have to pipe in for the benefit of the kids...  The front panel
> >>was a row of 16 switches adorned with 16 LEDs; a special bus address gave
> >>the switches value as a word when read, and showed a word's value on the
> >>LED when written.  (UNIX V6 had a system call (csw) which did that).

> >That's not a real front panel.  A real front panel has switches and lights
> >for address and data, and would let you examine or change memory as you
> >liked.  They were particularly useful on machines with no boot ROM - you'd
> >toggle in a short program that loads programs from tape, then press the
> >RUN button.

> >John West

First, toggle in the bootstrap (if core had been overwritten),
then feed in the simple loader, followed by the relocating loader.
THEN I was ready to run.

Jerry
--
Engineering is the art       |      Let's talk about what
of making what you want      |      you need; you may see
from things you can get.     |      how to do without it.
---------------------------------------------------------



Sat, 24 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:


>>>>(long nostalgic sigh)

>>>>I'm still looking for an -11 with a front panel.

>>>I just have to pipe in for the benefit of the kids...  The front panel
>>>was a row of 16 switches adorned with 16 LEDs; a special bus address gave
>>>the switches value as a word when read, and showed a word's value on the
>>>LED when written.  (UNIX V6 had a system call (csw) which did that).

   Oh how quickly we forget....

   I'm pretty sure they were lightbulbs, not LEDs.  Of course, by the time
   of the LSI-11, they probably did use LEDs and they probably got
   rid of the lightbulbs - I don't have a processor manual handy, and
   I never actually worked with the LSI-11.  My PDP-11 career ran from
   the 11/20 up thru the 11/70 (or maybe the 11/74 which I think may
   never have been released as a product....)

   And there was a row of 18 (!!) switches and 18 lightbulbs, because you
   had to be able to address the UNIBUS which was a 256K address space
   with memory and peripherals hung off it.

-- Al Lehotsky (a DIGIT from 75-83)

--
                Quality Software Management
             http://www.tiac.net/users/lehotsky

Process Improvement | Management Consulting | Compiler Implementation



Sat, 24 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:

>   Oh how quickly we forget....
>   I'm pretty sure they were lightbulbs, not LEDs.  Of course, by the time
>   of the LSI-11, they probably did use LEDs and they probably got
>   rid of the lightbulbs - I don't have a processor manual handy, and
>   I never actually worked with the LSI-11.  My PDP-11 career ran from

Well, 20 years is not quick... I started programming PDP-11s in the
summer of 79. On a PDP-11/03. I never saw a front panel with lights
and deposit toggles.

IIRC, we used the console TTY to type '167500g' at the microcode
monitor, to make it enter the bootstrap located on the RTC/bootrom/bus
terminator card. That read a boot block from disk.

And that booted RT-11SJ, of course. The only system I know where
typing CTRL+C would do a hard bus reset, swap out the running image
and reload the command interpreter from disk.




Sat, 24 Nov 2001 03:00:00 GMT  
 Threaded code on the PDP-11 (Re: Is RISC dead? (was: Re: K7's FP performance inches past P-III's))

Quote:
>IIRC, we used the console TTY to type '167500g' at the microcode
>monitor, to make it enter the bootstrap located on the RTC/bootrom/bus
>terminator card. That read a boot block from disk.

Providing you *had* a boot ROM...  Our first PDP11 at HUJI (a /45) did
not have any.  The manual listed a small program, 20-30 words (depending
on which device to boot from) which could be loaded into memory by the
successive setting of the address switches followed by pressing the LOAD
switch.  We got tired of doing it and kept looking for shortcuts;
eventually it was narrowed down to just 4 steps:

1.  Press RESET; this zeroes all registers.

2.  Set the switches to 777404 (that is, ON-ON-ON...OFF-OFF-ON-OFF-OFF)
and press LOAD; this loads the disk controller's command address.

3.  Set the switches to 5 (that is, OFF-OFF...OFF-ON-OFF-ON) and press
DEPOSIT.  5 is a READ|GO command for the disk; storing it causes the disk
controller to execute it, effectively reading block 0 of the disk (the
boot block, 512 bytes) into memory address 0.

4.  Set the switches to 0 and press START.  This starts the CPU executing
at address 0, which is the program just read in.  You'd be amazed at how
much a 512 bytes program can do, with some creativity!

(I hope I got it right, I was doing it almost every morning for a few
years, but that was ~20 years ago).
--
        Amos Shapir
Paper: nSOF Parallel Software, Ltd.
       Givat-Hashlosha 48800, Israel
Tel: +972 3 9388551   Fax: +972 3 9388552        GEO: 34 55 15 E / 32 05 52 N



Thu, 29 Nov 2001 03:00:00 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Modula II for PDP-11 running RT-11

2. I am not deaf, but am I mute?

3. PDP-11 forths

4. Ann: SOL, a minimum language and OS for the PDP-11

5. PDP-11 Forth?

6. PDP-11 forth

7. forth on a PDP-11

8. forth on the pdp-11

9. PDP-11 Fig Forth Source

10. FORTH.MAC / PDP-11 FIG Forth Source

11. FORTH.MAC / PDP-11 FIG Forth Source

12. PDP-11 Forth wanted.

 

 
Powered by phpBB® Forum Software