Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!sdcsvax!ncr-sd!hp-sdd!hplabs!oliveb!glacier!mips!hansen From: hansen@mips.UUCP (Craig Hansen) Newsgroups: net.arch Subject: Re: Re: Addressing modes Message-ID: <379@mips.UUCP> Date: Thu, 6-Mar-86 00:29:45 EST Article-I.D.: mips.379 Posted: Thu Mar 6 00:29:45 1986 Date-Received: Mon, 10-Mar-86 08:36:05 EST References: <187@anwar.UUCP> <1441@gitpyr.UUCP> <890@umn-cs.UUCP> <1468@gitpyr.UUCP> <307@ethz.UUCP> Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 59 > For those who have never seen a PDP-8 instruction set, here it is > The instructions were, then (some of the opcode names may be wrong, > it's been a long time...): > TAD Two's Complement Add ((acc) <- acc+(EA)) > SCA Store and Clear Accumulator ((EA)<-(acc), (acc)<-0) > ANA And Accumulator ((acc)<-(EA)&(acc)) > ISZ Increment & Skip on Zero ((EA)<-(EA)+1, skip if zero) > JMP Jump (PC)<-EA > JSR Jump to (EA)<-(PC),(PC)<-EA+1 More correctly, these should be: AND And TAD Two's Complement Add ISZ Increment and Skip if zero DCA Deposit and clear accumulator JMP Jump JSR Jump to subroutine > Mind you, I wouldn't want to program one in assembler though :-) . > -- > Peter Lamb ({seismo|decvax}!mcvax!cernvax!ethz!prl) > Institut fur Informatik > ETH-Zentrum > 8092 Zurich Actually, I found the machine really enjoyable to program in assembler. It was a instruction set that one could really learn completely, down to knowing exactly what the assembler could generate. It was common practice to locate the targets of AND instructions into memory so that the AND instruction was a useful character constant. Using the "microcoded" operate instructions, you could generate any of the constants 0,1,2,3,4,6,-1,-2,-3 in a single instruction. One of the more unique programs written for the machine was a two-voice music generator that generated its output on an FM reciever placed close to the front panel of the machine! Try that on your favorite multi-user, virtual memory computer! Because of the small page sizes, and the difficulty of generating relocatable code, I never encountered a really practical compiler for the PDP-8. Most so-called "compilers" generated pseudo-code, or virtual machine code, that was interpreted. In the realm of exploring the extremes of the price/performance relationship, DEC build the PDP-8/S, which was a bit-serial implementation of the PDP-8! In later years, the PDP-8 line suffered from "creeping featurism." For some reason, designers added an instruction which would swap the high and low-order 6 bits of the 12-bit accumulator, called "byte swap." I've got a lot of old code for the eight, but without a DECtape drive or a paper tape reader, I can't make too much use of it. Sigh. I could run a software emulator for the eight in real time nowadays, but it would never generate the same pattern of electrical noise on an FM radio.... Craig Hansen MIPS Computer Systems ...{decwrl,glacier}!mips!hansen