[comp.arch] MC 88k question

ok@quintus (07/27/88)

The MC88000 has add and subtract instructions which
  - ignore overflow, another set which
  - set a carry bit, and another set which
  - trap on overflow.
But the multiply instruction apparently only comes in a
  - quietly truncate to 32 bits
flavour.  So what is the recommended way of doing a 32x32 integer
multiplication with an overflow check?

And could someone explain in simple terms what the "multiply step"
instruction present in several RISCs does and how I can use it to
get a 32x32 integer multiplication with an overflow check?

Thanks for your trouble.

andrew@frip.gwd.tek.com (Andrew Klossner) (07/29/88)

.> The MC88000 has add and subtract instructions which
.>   - ignore overflow, another set which
.>   - set a carry bit, and another set which
.>   - trap on overflow.
.> But the multiply instruction apparently only comes in a
.>   - quietly truncate to 32 bits
.> flavour.  So what is the recommended way of doing a 32x32 integer
.> multiplication with an overflow check?

Convert to double-precision floating point, multiply, and convert to
integer.  (This was also the way to do it on the National 32016.)

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com@relay.cs.net)   [ARPA]