Programming a PDP-11 Through the Front Panel
ฝัง
- เผยแพร่เมื่อ 25 ส.ค. 2024
- This video shows how to enter a tiny program into a PDP-11 using the front panel switches. The program is then run and the output memory location is examined for correctness.
For more information, see the blog post: bigdanzblog.wo... - แนวปฏิบัติและการใช้ชีวิต
Used PDP 11's at Harwell when they first became available. They were powerful stuff in the day. Amazing how easy it is to slip back into Octal after 50 years :)
The reason that the address for your second byte of your first MOV instruction "jumped" to address 1002 is that on the PDP11, all instructions/data (the value 1 of the first instruction in this case) must start on a word boundary (even address). An attempt to reference an instruction/data at an odd address on a PDP11 causes a Boundary error. The third byte (register selector) of the your first MOV instruction similarly starts at even address 1004. The deposit function helps you avoid boundary errors. The IBM/360 like the PDP11 had strict word boundary requirements. These were relaxed for the IBM/370 at the cost of reduced performance. x86 machines also have optional alignment assembler directives to maximise performance. DEC joined the optional alignment club with the VAX architecture.
Thanks for this. I built one those kits 2 years ago and have it running “blinken’lights” demo on my desktop (really nicely make kit)
I have yet to start to learn how to program it. Your video is encouraging me to get back into it!
Would be great to have a couple more examples.
Cheers from Canada!
Have a look here. Points to a couple of videos and quite a few blog posts on the PiDP-11:
wp.me/p3PlCO-Y8
Yay, you started a channel! 🎉🎉🎉
Nice! Great to see an example for this since I'm only first digging into the PDP-11.
I had to pull open the handbook to see what was going on - particularly with the three words being used for a move. Was using the PC register for the values just for fun/demo, or does it have some sort of secret reasoning behind it for things outside the scope of this demo? Otherwise it seems like you could simplify it by using any of the general purpose registers instead of the PC register (R0 in this case), and then checking the register value.
012700 000001
062700 000001
000000
It's official! 1+1 =2. ;)
If the buttons were larger, you could poke in an octal number with three fingers.
The bigger front panel on the real PDP-11 is no doubt large enough to allow it.
Do you not play anything?
Try
1000: 5000
1002: 5230
1004: 1175
1006: 775
The best four words of PDP-11 code ever, the solution to everything you ever wanted
See if you can work it out
ok this is hurting my brain. does the offset for the branch at 1004 not make sense or am I stupid
Here is the assembly code
1$: CLR R0 5000
2$: INC @(R0)+ 5230
BNE 1$ 1375 (my mistake above, trying to code it in my head after 50 years)
BR 2$ 775
Explanation
This will increment the contents of word 0 and keep looping around to 1$. After 65535 loops when the contents of word 0 has once again returned to 0, then it loops to 2$ which increments the next word. Since the second word is now non-zero it will loop back up to 1$. This then rolls word 0 around once again before adding one to the next word (at address 2) once again. In theory this process would continue indefinately, effectively stringing the words of memory one after the other into one giant counter. However, even if this processor were to execute a million instructions per second it would take roughly 200 years before the fourth word would be reached.
I had to load the bootstrap code like that (a bootrom was optional). Knew it by heart. Must have been around 20 instructions in order to start the paper tape reader.😮