PDP-8/E EAE MUY Instruction
Kyle Owen
kylevowen at gmail.com
Wed Jan 28 16:16:40 CST 2015
I've been working on a software emulation of the Extended Arithmetic
Element for the PDP-8/E. I've been struggling a little with the multiply
(MUY) instruction in particular.
I don't have an actual EAE to test this all with, but I'd appreciate anyone
with one to test out a bit of code to confirm.
In any event, both SimH and the OS X PDP-8/E Simulator exhibit the same
symptoms, which seem to multiply (PC + 1) by MQ and add AC, placing that
result into AC, MQ. Expected behavior, best I can tell from the Maintenance
Manual Volume 2, would be (PC + 1) * MQ -> AC, MQ, without the addition of
the previous AC prior to executing MUY. If this is the case, then clearing
AC would be essentially required, unless you want to add that value after
the multiply (which could be a useful mathematical operation in some
circumstances).
There is a little code found on bitsavers that seems to emulate these EAE
instructions:
http://bitsavers.trailing-edge.com/bits/DEC/pdp8/From_Vince_Slyngstad/digital/digital-8-17-u-ascii.txt
You'll
note that there is no DCA at the top of the MUY subroutine to save AC in
order to add it to MQ (and complete the carry) afterward.
I've been writing a comparison tool after finding that one program changed
to support the software EAE failed to function correctly, hence attempting
to track down some differences.
If you're interested in trying on real hardware (which would be
appreciated), here's what I'm running:
MUY=7405
DVI=7407
NMI=7411
SHL=7413
ASR=7415
LSR=7417
MQL=7421
SCL=7403
SCA=7441
MQA=7501
CAM=CLA MQL
*200
CLA CLL
TAD MQVAL
MQL
TAD ACVAL
HLT
MUY
7777
HLT
MQVAL, 7777
ACVAL, 7777
$
After the first halt, AC=MQ=7777, as expected. After continuing, AC=7777,
MQ=0000. This would be equivalent to 7777*7777+7777=77770000, rather than
the expected value of 7777*7777=77760001.
Any help would greatly ease my concerns!
Kyle
More information about the cctech
mailing list