Has Anyone Written PDP-8 .XOR. Code Using the MQ Register (Without the EAE)?

dwight dkelvey at hotmail.com
Thu Dec 24 01:55:22 CST 2015


 Without the TMP on the Nicolet

MEMA ARGONE
ANDA ARGTWO
LASH 1
ANGA
A+MA ARGONE
A+MA ARGTWO ( or A+MM ARGTWO to save in ARGTWO )

The link bit isn't used by LASH or adds on the Nicolet. It is only the carry out of an add.
It is a little more clumsy to use as a carry. It can only be used as a condition of a skip or execute.




________________________________________
From: cctalk <cctalk-bounces at classiccmp.org> on behalf of Don North <north at alum.mit.edu>
Sent: Wednesday, December 23, 2015 11:21 PM
To: cctalk at classiccmp.org
Subject: Re: Has Anyone Written PDP-8 .XOR. Code Using the MQ Register (Without the EAE)?

On 12/23/2015 10:50 PM, Don North wrote:
> On 12/23/2015 7:14 PM, Christian Gauger-Cosgrove wrote:
>> On 23 December 2015 at 13:44, CLASystems <clasystems at gmail.com> wrote:
>>> Ironically, the shortest and fastest seems to be avoidance of the MQ
>>> altogether [thus making it work on ANY model].
>>>
>>>      TAD  ARGONE
>>>      AND  ARGTWO
>>>      CLL RAL
>>>      CIA
>>>      TAD  ARGONE
>>>      DCA ARGTWO
>>>
>>> This works because .XOR. is addition ignoring the carry bits. So, knowing
>>> they will happen, just allow them at first, then remove them.
>>>
>> Hmm, I just tried that in SIMH, and that doesn't XOR at all.
> I think there was just a bit of brain fade in the original listing. From
> DEC-08-FFAA-D PDP-8 Math Library circa 1968
> the XOR routine is as follows, transcribed to SIMH:
>
> sim> de 76 1234
> sim> de 77 4321
> sim> ie -m 100-107
> 100:    CLA CLL
> 101:    TAD 76
> 102:    AND 77
> 103:    CIA
> 104:    CLL RAL
> 105:    TAD 76
> 106:    TAD 77
> 107:    HLT
> sim> go 100
>
> HALT instruction, PC: 00110 (AND 0)
> sim> ex ac
> AC:     5115
>
> Which produces the correct result in the AC. Locations 103/104 were swapped in
> order, and location 106 was left out.
> And for completeness location 100 was added to initially clear the AC/Link.
>
> Don
>

FYI here is a link to find the document:
http://manx.classiccmp.org/details.php/1,3191
I can't find it under dec/pdp8 on bitsavers, maybe I'm just not seeing it.

Don





More information about the cctech mailing list