5. ● 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
6. ● 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
7. is currently most famous for the 1977 quote
"There is no reason for any individual to have
a computer in their home."
Ken Olsen
16. (Live demo time! Cross fingers.)
Let's log in and write a program
17. 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,
19. ● 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
20. 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
21. 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
22. ● 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
23. ● " " memory to register
● "I" immediate to register
● "M" register to memory
● "S" to self
General instruction variants
26. Habxy
a: R or L
b: R or L
x: Ones or Zero
y: Variant
● HRL 1,5000
● HRRZI 1,5000
● HLRZM 1,5000
● HLLOI 1,5000
Half-word moves
27. ...
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==10
TAB: BLOCK N
Some example code
28. 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
29. 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
30. TITLE Hello
SUBTTL Print hello world three times
COUNT==3
MAIN: MOVEI 1, COUNT
PRINT: TTCALL 3, [ASCIZ /Hello world
/]
SOJG 1, PRINT
EXIT
END MAIN ; This is a comment
Anatomy of a MACRO-10 program
32. Let's go more advanced
(Live demo time again! Fingers: assume the
position.)
33. ● 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?
34. Dave G. Conroy PDP-10/X, running ITS
... or you could build your own