10

The PDP-7 was a bookshelf-sized "minicomputer", with keyboard, magnetic and paper tape and printer I/O. According to Wikipedia, the first version of UNIX (then named Unics) was programmed in assembly on the PDP-7.

Despite this, I can't find much information about the PDP-7's assembly syntax nor instruction set. As only knowledge of the registers and instructions are required to write and interpret bytecode, this information is the most important for understanding PDP-7 code.

What instruction set was used by PDP-7 minicomputers?

  • Like with retrocomputing.stackexchange.com/q/1610/278, there should be another tag here (probably replacing software). Tomorrow I'll ask on meta (if I remember to! else it might be two or three days time...). – wizzwizz4 Oct 29 '16 at 21:15
  • 1
    BTW, you may be interested in the pdp7 simulation provided by simh, and this git repository if unix v0. Also, PDP-7 uses 18 bit words, and notation is octal, not hex. – dirkt Oct 31 '16 at 18:46
  • 1
    For the full instruction set see pages 3-3 to 3-10 of the PDP7 Reference Manual at Bitsavers or either of 1964 or 1965 user handbooks on the PDP7 website in the "Miscellaneous DEC information" section at the bottom of the page. – Mike Hatch Sep 7 '17 at 13:30
  • Why was @MikeHatch s answer converted to a comment? – Wilson Sep 7 '17 at 15:23
  • @Wilson Likely because it is a duplicate (and link-only subset) of the current accepted answer, which predated MikeHatch's answer. However, I don't know the actual reason. – wizzwizz4 Sep 7 '17 at 15:40
13

BitSavers has a couple of PDP-7 manuals available. In particular, you will be interested in the PDP-7 Reference Manual.

The PDP-7 has 16 basic instructions:

  • cal - Call subroutine
  • dac - Deposit AC
  • jms - Jump to subroutine
  • dzm - Deposit zero in memory
  • lac - Load AC
  • xor - Exclusive OR
  • add - Add (1's complement)
  • tad - Twos complement add
  • xct - Execute
  • isz - Index and skip if zero
  • and - AND
  • sad - Skip if AC is different
  • jmp - Jump
  • eae - Extended Arithmetic Element instruction
  • iot - Input/Output Transfer
  • opr - Operate

The last three (eae, iot and opr) are classes of instructions that use additional bits in the instruction word to specify the specific operation to be performed. In particular, the opr instruction with no additional bits set does nothing (i.e. it is the "no operation" instruction).

  • It seems that cal is equivalent to jms to a particular address. Why did the designers feel the need to include that cal instruction? – Wilson Oct 31 '16 at 21:41
  • @Wilson: one could use the address field to store some additional data that could be accessed after the call, so I assume the intention was to use it to call an OS API etc., similar to "software interrupts" in newer architectures. – dirkt Nov 1 '16 at 16:36
  • 1
    eae, iot and opr thus sound a lot like the Block II Apollo guidance computer's INDEX instruction to perform additional operations. – a CVn Nov 3 '16 at 14:13
  • 1
    eae, iot and opr are extremely similar also to the same instructions on the PDP-8. – Wilson Nov 4 '16 at 9:57
  • The cal instruction was used on the pdp1 computer to implement a software based stack oriented instruction like the PUSHJ on the pdp6. Because the address was ignored by the hardware, it could be used by the software routine to say where control was to be transferred to after the return address was placed on the stack. No corresponding POPJ facility was needed, because the returnee could just jump to the sw routine. – Walter Mitty Nov 30 '16 at 20:01
3

The pdp-7 was in the same family as the pdp-1 and the pdp-4. Many of the opcodes were carried forward from one computer to the next. The main changes were the introduction of 2s complement arithmetic in place of the 1s complement arithmetic of the pdp-1, and the use of ASCII codes instead of Fio-Dec. I'm not certain whether that last one resulted in any changes to the instruction set.

There are fairly complete instruction manuals for the pdp-1 on the web. You might use those as a starting place.

Here are a couple of links to PDP 1 documentation. Pdp 1 Instruction Set if you just want the instruction set Pdp 1 Manual if you want the whole manual in pdf format.

See the other answer for links to PDP 7 docs.

  • Welcome to Retrocomputing. I see that you've already got your association bonus, so you know how Stack Exchange works and will understand what I'm going to say. Your first paragraph is good, but it appears to be implying that you have access to the PDP-1 and PDP-4 opcodes as well as the PDP-7 opcodes, but declined to include them in your answer; it would be good (if you can find them) to include these as supplementary information. Your second paragraph reads more like a comment that somebody would leave if they wanted to help but didn't have time to write an answer. Thanks for sharing your inf – wizzwizz4 Nov 30 '16 at 19:56
  • 1
    And PDP 1 is slightly off topic if the desire is to know about the pdp 7. – Walter Mitty Dec 1 '16 at 11:03
  • It's not off topic if it is relevant to the answer, for example if it has the same or similar instruction set. – JeremyP Sep 8 '17 at 8:36
  • The PDP-7 and PDP-1 are of the same family. a lot of the opcodes are the same. – Walter Mitty Sep 8 '17 at 10:34
  • 1
    I don't consider the PDP-1 to belong to he same family as the other 18-bit PDP series. That's because software for the PDP-1 wasn't upwards compatible with the PDP-4 and later. But PDP-4 software was upwards compatible with the PDP-7/9/15. – Lars Brinkhoff Dec 13 '17 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.