[Coco] 6309 MULD real and emulators
Robert Gault
robert.gault at att.net
Thu Oct 24 22:47:25 EDT 2019
There was a question posted about the 6309 opcode MULD. That is a multiplication of the content of
regD with Immediate, Direct, Extended, or Indexed numbers. What makes it different from the opcode
MUL is that MULD is a signed multiplication.
However, be warned that while for a real 6309, and the MAME/MESS emulator MULD is signed, it is
unsigned with VCC v2.0.1. VCC should be corrected!
ex.
real 6309
ldd #$8001
muld #$8001
regQ = $3FFF0001
VCC
ldd #$8001
muld #$8001
regQ = $40010001 Correct if the multiplication was unsigned.
You can get the same $3FFF0001 answer with
real 6309
ldd #$7FFF
muld #$7FFF
regQ = $3FFF0001
Now since $10000-$7FFF=$8001 the above signed math makes sense as $8001=-$7FFF.
Robert
More information about the Coco
mailing list