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

Kyle Owen kylevowen at gmail.com
Wed Dec 23 22:43:54 CST 2015

Steve Gibson talks about XOR on the PDP-8 here:

In summary, Steve uses this condensed code using "carryless addition" for

CLA            / clear accumulator (AC) since all we have is add!
TAD   ArgOne   / add (TAD) ArgOne to the just-zeroed AC
AND   ArgTwo   / AND ArgTwo to determine where the carrys will be
CLL RAL        / clear the LINK (CLL) and rotate the accumulator left (RAL)
CMA IAC        / compliment (CMA) & increment (IAC) the accumulator (negate)
TAD   ArgOne   / add the first argument to the negated accumulator
TAD   ArgTwo   / and add the second argument as well
               / the accumulator now contains the XOR of ArgOne & ArgTwo

Best I can tell, Charles proposed the same thing, but for whatever reason
changed the last instruction to DCA instead of TAD.


More information about the cctech mailing list