> On Nov 4, 2024, at 12:34 AM, ben via cctalk <cctalk@classiccmp.org> wrote:
> 
> On 2024-11-03 9:37 p.m., Tony Duell via cctalk wrote:
>> On Mon, Nov 4, 2024 at 4:06 AM Mychaela Falconia via cctalk
>> <cctalk@classiccmp.org> wrote:
>>> 
>>> Paul Koning wrote:
>>> 
>>>> 1. Show a one-word PDP-11 program that writes all of memory, in reverse 
>>>> order.
>>> 
>>> MOV -(PC),-(PC)
>> Does that work on all models of PDP11?
>> I had an idea that (as in C) the order of the decrements and reads was
>> not specified by the instruction set definition and that on some
>> machines (the 11/45?) it doubly decrements PC before reading or
>> storing.
>> -tony
> 
> Where there any user instructions between models that gave strange behavior 
> on the wrong machine?

Yes, and they are documented in the PDP-11 architecture manual, in an appendix. 
 But it cases that are machine dependent are more exotic, things like mixing a 
register reference with an auto inc/dec of the same register.  The magic move 
will work on any of them.

On the "one word clear", I missed a detail.  I pointed out you get to 
initialize the registers.  You can also initiate one memory word.  In other 
words: choose two words in memory, and registers contents, such that execution 
will give you a memory full of zeroes and a halted machine.

        paul

Reply via email to