Article View: comp.arch
Article #1540Re: DECSYSTEM 20
From: Mark Nelson
Date: Sun, 16 Jul 1989 19:36
Date: Sun, 16 Jul 1989 19:36
57 lines
3089 bytes
3089 bytes
In article <3256@wpi.wpi.edu> jhallen@wpi.wpi.edu (Joseph H Allen) writes:
>
>A question for those old diehard dec fans... We (WPI) used to have a
>DECSYSTEM 20. One interesting thing about the DEC 20 (and I guess DEC 10 and
>pdp-6 as well) is that the registers are the first 8 or 16 locations in the
>main memory map. Does anyone know if code can be run in the registers? And
>if so, does it execute any faster than if it was in normal memory?
>
>Here's some other interesting DEC 20 features for those who don't know:
>
> - Each address had an indirect bit. Therefore you could do
> infinite levels of indirections. You can even crash your program
> by having self indirections.
>
We had DEC-20s where I went to school (Wesleyan University). One of
the things that bothered me about the machines is that they didn't
have an instruction I wanted: MOVEMI (move to memory immediate).
Some explanation:
The DEC-20 was a 1 1/2 address machine: every instruction could contain
one memory location and one register source or destination. There were
three basic move instructions:
MOVE R1 mem Load the contents of memory location mem to
register 1
MOVEM R1 mem Store the contents of R1 to memory location
mem
MOVEI R1 exp Put exp in R1 (load immediate, in other words)
Now comes the fun part. As noted above, each address had an indirect bit,
written symbolically as @, and as long as the address in the original
instruction had the indirect bit set, indirection could continue to an
arbitrary depth (with loops possible :-).
So for example, if memory were set up as (location : contents)
100 : @200
200 : 300
300 : 400
Then MOVE R1 @100 would load 400 into R1, but MOVEI R1 @100
would load 300 into R1. The way I remembered it was that MOVE would
load the second word in the indirection chain with the indirect bit
clear, while MOVEI would load the first word with a clear indirect
bit.
Going to memory, MOVEM R1 @100 would store the contents of R1 in
location 300, so it was basically the inverse of MOVE. But there
wasn't any inverse of MOVEI. For an project I was working on, I
wanted to do the equivalent in invisible forwarding pointers in
some Lisp implementations. MOVEI for loads and my mythical MOVEMI
for stores fit perfectly. But without MOVEMI I ended up having to
add an extra level of indirection to all addresses.
Mark Nelson ...!rutgers!udel!nelson or nelson@udel.edu
This function is occasionally useful as an argument to other functions
that require functions as arguments. -- Guy Steele
Technical Details
Message-ID:
<19835@louie.udel.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!nelsonReferences:
<3256@wpi.wpi.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!udel!nelson From: nelson@udel.EDU (Mark Nelson) Newsgroups: comp.arch Subject: Re: DECSYSTEM 20 Message-ID: <19835@louie.udel.EDU> Date: 16 Jul 89 19:36:05 GMT References: <3256@wpi.wpi.edu> Sender: usenet@udel.EDU Reply-To: nelson@udel.EDU (Mark Nelson) Organization: University of Delaware Lines: 57