the pdp-10 - and me

36
The PDP-10 (and me) Jan 15 2013 Bjørn Hell Larsen [email protected]

Upload: bjorn-hell-larsen

Post on 17-Aug-2014

62 views

Category:

Devices & Hardware


1 download

DESCRIPTION

Presentation given at the Stavanger Software Developer meetup Januar 2013.

TRANSCRIPT

Page 1: The PDP-10 - and me

The PDP-10 (and me)

Jan 15 2013Bjørn Hell Larsen

[email protected]

Page 2: The PDP-10 - and me

How to get ten liters of stuff into a half-liter bottle(or eight years of hacking into an one-hour talk)

Page 3: The PDP-10 - and me

DECsystem-1077

Me

Page 4: The PDP-10 - and me

The computer world of the 80ies

Page 5: The PDP-10 - and me

● Bytes are 8 bits● Files are streams of bytes● Integers come in various sizes● Computers are networked● Programs run in processes● A program can fork() new processes● Processes have threads● We can send signals to processes● File systems has links● Commands can be piped

Stuff we take for granted

Page 6: The PDP-10 - and me

● DEC: Digital Equipment Corporation (aka "Digital")● (Established 1957 by Ken Olsen (aquired 1998 by Compaq (merged

2002 with HP)))

● PDP: Programmable Data Processor - DECs main line of processors

● Notable DEC products:○ PDP-1, PDP-8, PDP-10, PDP-11, VAX, Alpha○ DECtape, VT100, OSF/1

Page 7: The PDP-10 - and me

is currently most famous for the 1977 quote

"There is no reason for any individual to have a computer in their home."

Ken Olsen

Page 8: The PDP-10 - and me

PDP-10 hardware timeline

Page 9: The PDP-10 - and me

PDP-10 hardware layout

Page 10: The PDP-10 - and me

PDP-10 peripherals

Page 11: The PDP-10 - and me

● TOPS-10 (aka "Monitor")● TENEX● TOPS-20● ITS ● WAITS

The PDP-10 OS lineup

Page 12: The PDP-10 - and me

● Created by Bob Supnic● Emulates

● Data General Nova, Eclipse● Digital Equipment Corporation PDP-1, PDP-4, PDP-7, PDP-8, PDP-9,

PDP-10, PDP-11, PDP-15, VAX● GRI Corporation GRI-909, GRI-99● IBM 1401, 1620, 1130, 7090/7094, System 3● Interdata (Perkin-Elmer) 16b and 32b systems● Hewlett-Packard 2114, 2115, 2116, 2100, 21MX, 1000● Honeywell H316/H516● MITS Altair 8800, with both 8080 and Z80● Royal-Mcbee LGP-30, LGP-21● Scientific Data Systems SDS 940● SWTP 6800

The SIMH emulator

Page 13: The PDP-10 - and me

.DIR

.TYPE

.COPY

.DELETE

.RENAME

.. looks familiar, yes?

A TOPS-10 command primer

Not so familiar:

.DETACH

.ATTACH

.SYSTAT

.SOS

.TECO

Page 14: The PDP-10 - and me

ButC:\> mkdir fooC:\> cd fooC:\FOO> dir

becomes:.r credirCreate directory: [,,foo] Created DSKC0:[42,42,FOO].SFD/PROTECTION:775Create directory: ^Z

.r setsrc*cp [,,foo]*^ZEXIT.dir%WLDDEM Directory is empty

A TOPS-10 command primer

Page 15: The PDP-10 - and me

Booting TOPS-10 in a simulator

Page 16: The PDP-10 - and me

(Live demo time! Cross fingers.)

Let's log in and write a program

Page 17: The PDP-10 - and me

that was good fun, but FORTRAN is not the reason why the PDP-10 is a great processor.

To discover the real reason, we have to dig a bit deeper.

Ok,

Page 18: The PDP-10 - and me

BLISS

Page 19: The PDP-10 - and me

● 36-bit words● 16 general purpose 36-bit registers● 18-bit (half-word) addressing● Registers are locations 0-20 of the

memory space● Highly symmetric instruction set● Unimplemented instructions are thrown to

the OS and used for system calls● Hardware byte manipulation support● Definitively NOT a RISC architecture

PDP-10 processor architecture

Page 20: The PDP-10 - and me

Most instructions have the format:

Bit 000000000 0111 1 1111 112222222222333333 Position 012345678 9012 3 4567 890123456789012345 ________________________________________ | | | | | | | OP | AC |I| X | Y | |_________|____|_|____|__________________|

- OP = operation code - AC = accumulator field - I = indirect bit - X = index field - Y = address field

Instruction format

Page 21: The PDP-10 - and me

Some example instructions:

move 1, @100 ; MOVE is the OP. AC is 1. ; @ sets the I bit. ; X is zero, Y is 100.

hrrz 17, 1(3) ; HRRZ is the OP. AC is 17, ; Y = 1, X = 3, I = 0

sos foo ; SOS is OP, FOO is symbolic ; for the Y field. AC, X, I ; are 0. ________________________________________ | | | | | | | OP | AC |I| X | Y | |_________|____|_|____|__________________|

- OP = operation code - AC = accumulator field - I = indirect bit - X = index field - Y = address field

Instruction format

Page 22: The PDP-10 - and me

● 000-077: Unimplemented User Operations ● 100-177: Floating point and Byte manipulation ● 200-277: Fixed point (36-bit integer) and subroutine calls● 300-377: Hop, skip and jump● 500-577: Half-word operations● 600-677: Bit testing ● 700-777: Input/Output instructions

Instruction classes

Page 23: The PDP-10 - and me

● " " memory to register● "I" immediate to register● "M" register to memory● "S" to self

General instruction variants

Page 24: The PDP-10 - and me

● MOVE - move● MOVN - move negative● MOVM - move magnitude● MOVS - move swapped

Specific instruction variants

Page 25: The PDP-10 - and me

● MOVE 1,5000● MOVEI 1,5000● MOVEM 1,5000● MOVES 1,5000

● MOVN 1,5000● MOVNI 1,5000● MOVNM 1,5000● MOVNS 1,5000

Example: MOVE

● MOVM 1,5000● MOVMI 1,5000● MOVMM 1,5000● MOVMS 1,5000

● MOVS 1,5000● MOVSI 1,5000● MOVSM 1,5000● MOVSS 1,5000

Page 26: The PDP-10 - and me

Habxya: R or Lb: R or Lx: Ones or Zeroy: Variant

● HRL 1,5000● HRRZI 1,5000● HLRZM 1,5000● HLLOI 1,5000

Half-word moves

Page 27: The PDP-10 - and me

... MOVSI 1,-N ;Initialize register 1 to -N,,0 MOVEI 2,3 ;register 2 gets the constant 3. ADDM 2,TAB(1) ;add 3 to one array element. AOBJN 1,.-1 ;increment both the index and the control. ;Loop until the ADDM has been done N times. ...

N==10TAB: BLOCK N

Some example code

Page 28: The PDP-10 - and me

JUMP Jump never. This instruction is a no-op.JUMPL If C(AC) < 0 then PC<-E;JUMPLE If C(AC) <= 0 then PC<-E;JUMPE If C(AC) = 0 then PC<-E;JUMPN If C(AC) # 0 then PC<-E;JUMPGE If C(AC) >= 0 then PC<-E;JUMPG If C(AC) > 0 then PC<-E;JUMPA PC<-E. This is an unconditional branch.

JUMP

Page 29: The PDP-10 - and me

CHAPTER 1

INTRODUCTION TO MACRO

MACRO is the symbolic assembler program for the DECsystem-lO.The assembler reads a file of MACRO statements and composes relocatable binary machine instruction code suitable for loading by LINK, the system's linking loader.

MACRO-10

Page 30: The PDP-10 - and me

TITLE Hello SUBTTL Print hello world three times

COUNT==3MAIN: MOVEI 1, COUNTPRINT: TTCALL 3, [ASCIZ /Hello world/] SOJG 1, PRINT EXIT

END MAIN ; This is a comment

Anatomy of a MACRO-10 program

Page 31: The PDP-10 - and me

Let's try it

Page 32: The PDP-10 - and me

Let's go more advanced

(Live demo time again! Fingers: assume the position.)

Page 33: The PDP-10 - and me

● Get a simulator● Get some software● Grab some manuals and RTFM● Have fun!

● It is amazing how much ancient stuff is out there when you look around for a bit. And the old-timers are overjoyed whenever someone shows an interest

Want to play yourself?

Page 34: The PDP-10 - and me

Dave G. Conroy PDP-10/X, running ITS

... or you could build your own

Page 35: The PDP-10 - and me

POPJ P,

Page 36: The PDP-10 - and me

Dead 28. december 2012

● PDP-10 lover● WAITS hacker● Telnet implementor● IMAP inventor● Author of RFC4042,

UTF-9 and UTF-18 Efficient Transformation Formats of Unicode

RIP Mark Crispin