Messages 31-40 from thread
<< Previous 10 messages in thread   Next 6 messages in thread >>
Message 31 in thread
From: Geoffrey G. Rochat ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/16

A general question open to all PDP-11 folks (ie; "Thems what knows."):
What happens if you use R7 in auto-decrement or auto-decrement-deferred
mode (mode 4 or 5)?  And does this vary by model number, source vs.
destination address, etc.?  My copy of the "PDP-1104/05/10/35/40/45
Processor Handbook", circa 1975, very carefully skirts this issue.
Message 32 in thread
From: Michael Davidson ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/16
"Geoffrey G. Rochat" wrote:
> 
> A general question open to all PDP-11 folks (ie; "Thems what knows."):
> What happens if you use R7 in auto-decrement or auto-decrement-deferred
> mode (mode 4 or 5)?  And does this vary by model number, source vs.
> destination address, etc.?  My copy of the "PDP-1104/05/10/35/40/45
> Processor Handbook", circa 1975, very carefully skirts this issue.

What happens is "exactly what you would expect to happen" ...

For example there is the single instruction self-replicating program:

014747	MOV	-(%7),-(%7)

which will copy itself down in memory

There is also a single instruction "fill all of memory" program:

015720	MOV	@-(%7),(%0)+

which fills memory starting at whatever address R0 points to
with the contents of address 015720

OK, it isn't *quite* a single instruction program since you have
to load R0 with a value and set up the contents of location 015720,
but it's *close* ;-)

If you set both R0 and 015720 to 0 and put the 015720 instruction
in the last address in memory then this is a neat "clear memory"
program which wipes itself out and halts cleanly.
Message 33 in thread
From: Michael Davidson ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/16
Michael Davidson wrote:
> 
> 
> For example there is the single instruction self-replicating program:
> 
> 014747  MOV     -(%7),-(%7)
> 
> which will copy itself down in memory
> 
> There is also a single instruction "fill all of memory" program:
> 
> 015720  MOV     @-(%7),(%0)+
> 
> which fills memory starting at whatever address R0 points to
> with the contents of address 015720
> 

Something which I forgot to mention is that, to the best of my
knowledge, these are perfectly well defined instructions which
will work in exactly the same way on any PDP-11.

What will vary with different processors is the precise manner
in which things like the "self-replicating program" will trap
after it has written to address 0.
Message 34 in thread
From: Adrian Lumsden ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/16
I only remember finding two uses for -(PC).

One was planting 014747, MOV -(PC), -(PC), in memory with ODT and then
starting from that location. It was a useful trick for zapping memory
quickly.

The other was something to do with the challenge to write a routine
which would completely zero all of memory. This reduces down to "How do
I get rid of the last few words?" I remember figuring it out but not how
it was done. It depended on planting an instruction at the address
formed by it's opcode and executing it. I seem to remember the address
and opcode started 015...

Anybody know if this trick can be done for other architectures?

Adrian
--
Adrian Lumsden, XDT Computer Systems, UK
A dot Lumsden at xdt dot co dot uk

Geoffrey G. Rochat <geoff@pkworks.com> wrote in message
news:8frp38$e3g$1@news.kersur.net...
> A general question open to all PDP-11 folks (ie; "Thems what knows."):
> What happens if you use R7 in auto-decrement or auto-decrement-deferred
> mode (mode 4 or 5)?  And does this vary by model number, source vs.
> destination address, etc.?  My copy of the "PDP-1104/05/10/35/40/45
> Processor Handbook", circa 1975, very carefully skirts this issue.
>
>
>
Message 35 in thread
From: Mike Yankus ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/17
Adrian Lumsden <A.Lumsden@xdt.co.uk> wrote in message
...
> I only remember finding two uses for -(PC).
>
> One was planting 014747, MOV -(PC), -(PC), in memory with ODT and then
> starting from that location. It was a useful trick for zapping memory
> quickly.
>
> The other was something to do with the challenge to write a routine
> which would completely zero all of memory. This reduces down to "How do
> I get rid of the last few words?" I remember figuring it out but not how
> it was done. It depended on planting an instruction at the address
> formed by it's opcode and executing it. I seem to remember the address
> and opcode started 015...
>

I remember putting a CLR (R0)+ , BR *-2 (5020, 776) at loc 0/2 and
letting it go. When the cpu halted locations 0 and 2 were zeros.
I don't remember what mechanism made this happen.

Mike
Message 36 in thread
From: Ben Franchuk ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers, vmsnet.pdp-11, alt.sys.pdp11
View this article only
Date: 2000/05/17
Mike Yankus wrote:
> 
> Adrian Lumsden <A.Lumsden@xdt.co.uk> wrote in message
> ... 
> > The other was something to do with the challenge to write a routine
> > which would completely zero all of memory. This reduces down to "How do
> > I get rid of the last few words?" I remember figuring it out but not how
> > it was done. It depended on planting an instruction at the address
> > formed by it's opcode and executing it. I seem to remember the address
> > and opcode started 015...
> >
> 
> I remember putting a CLR (R0)+ , BR *-2 (5020, 776) at loc 0/2 and
> letting it go. When the cpu halted locations 0 and 2 were zeros.
> I don't remember what mechanism made this happen.
> 
> Mike

If I remember in the back issues of BYTE ( The real early ones ) had
that
way of doing that for the 8080. I think it was a multi pass process -
fill
memory up instructions to clear memory and then clear it several passes.

-- 
"We do not inherit our time on this planet from our parents...
 We borrow it from our children."
"Ancient Logic" 
Message 37 in thread
From: Tim Shoppa ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: vmsnet.pdp-11, alt.sys.pdp11, alt.folklore.computers
View this article only
Date: 2000/05/22
Johnny Billquist wrote:
> 
> On Fri, 19 May 2000, Adrian Lumsden wrote:
> 
> > I did the same sort of thing. I defined them as Jxx though to achieve
> > the
> > same result. I felt that this made it clear to me that I was using a
> > jump.
> > In the unlikely event that the code was changed to bring a BR back
> > in range I could review the Jxx and convert them back to branches.
> >
> >         .MACRO  JNE     ADR
> >         BEQ     .+6
> >         JMP     ADR
> >         .ENDM
> >
> >         .MACRO  JEQ     ADR
> >         BNE     .+6
> >         JMP     ADR
> >         .ENDM
> 
> Whoa! Those are dangerous macros... Works fine if the destination is an
> address, but what if someone figure to do a JNE (R0)...

  NOBODY expects the MACRO ARGUMENT INQUISITION!  Our chief
  weapon is unexpected addressing modes... unexpected addressing
  modes and local branches out of range.  Our two weapons are
  unexpected addressing modes and local branches out of range
  and quoted argument lists.  Our *three* weapons are unexpected
  addressing modes, local branches out of range, quoted argument
  lists, and an almost fanatical devotion to the pope.  *Amongst*
  our weapons are such elements as unexpected addressing modes, local
  branches out of range... I'll come in again.

I agree, you gotta be careful with Macros, as often the Macro
will take addressing modes or arguments that you'd never considered
and do "interesting" things with them.  For example, I often use
Macros to build static null-terminated data structures, and allowing
a zero in the data itself of course screws up the data structure.
This is more of a fundamental design error than an implementation
error, though.  (In the same way that null terminated strings are
an implementation error of C, too...)

Adrian seems to use JNE as nothing more than a long-range version
of BNE, so it's probably never seen anything other than the single
address mode that is legal with BNE.

That said, the simple solution if you want to do JNE (R0) is to
replace the target of the BNE .+6 with a local label in the macro.
Or put some .ASSUME's on relative PC position before and after.

Tim.
Message 38 in thread
From: Heinz W. Wiggeshoff ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers
View this article only
Date: 2000/05/22
Tim Shoppa (shoppa@trailing-edge.com) writes:
> 
>   NOBODY expects the MACRO ARGUMENT INQUISITION!  Our chief
>   weapon is unexpected addressing modes... unexpected addressing
>   modes and local branches out of range.  Our two weapons are
>   unexpected addressing modes and local branches out of range
>   and quoted argument lists.  Our *three* weapons are unexpected
... etc.

  Would this be considered a Palindrome?
Message 39 in thread
From: Johnny Billquist ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers
View this article only
Date: 2000/05/22
"Heinz W. Wiggeshoff" wrote:
> 
> Tim Shoppa (shoppa@trailing-edge.com) writes:
> >
> >   NOBODY expects the MACRO ARGUMENT INQUISITION!  Our chief
> >   weapon is unexpected addressing modes... unexpected addressing
> >   modes and local branches out of range.  Our two weapons are
> >   unexpected addressing modes and local branches out of range
> >   and quoted argument lists.  Our *three* weapons are unexpected
> ... etc.
> 
>   Would this be considered a Palindrome?

No. But it was a very good spin on an old MP skit.
Made my face twist and turn.

Now! Cardinal Fang. Bring.... the comfy chair!

	Johnny

-- 
Johnny Billquist             |  johnny.billquist@netinsight.net
Net Insight AB               |  phone:  +46 8 685 04 88
Västberga Allé 9             |  fax:    +46 8 685 04 20
Box 42093                    |
SE-126 30 STOCKHOLM, Sweden  |  

Message 40 in thread
From: Tim Shoppa ()
Subject: Re: Orthogonality (was Re: Motorola/Intel Wars)
Newsgroups: alt.folklore.computers
View this article only
Date: 2000/05/22
Johnny Billquist wrote:
> 
> "Heinz W. Wiggeshoff" wrote:
> >
> > Tim Shoppa (shoppa@trailing-edge.com) writes:
> > >
> > >   NOBODY expects the MACRO ARGUMENT INQUISITION!  Our chief
> > >   weapon is unexpected addressing modes... unexpected addressing
> > >   modes and local branches out of range.  Our two weapons are
> > >   unexpected addressing modes and local branches out of range
> > >   and quoted argument lists.  Our *three* weapons are unexpected
> > ... etc.
> >
> >   Would this be considered a Palindrome?
> 
> No. But it was a very good spin on an old MP skit.

To quote a different skit, "it's a pun" :-)  Cardinal Ximinez was
played by Michael Palin ... Palindrome!

> Made my face twist and turn.
> 
> Now! Cardinal Fang. Bring.... the comfy chair!

	Okay, stop.  Stop.  Stop there - stop there.  Stop.  Phew! Ah!
        ...our chief weapons are surprise...blah blah blah.  Cardinal,
        read the charges.

Tim.

   

©2001 Google