Tony Duell wrote:
Tony
Duell wrote:
What do you mean by 'hardware' multiply
and divide? A number of machines,
I suspect the 6809 is amongst them, had no particualrl hardware for
multiply or divide, but they did have multiply and maybe divide
instrucitons in the instruction setc. These instrucitons were implemented
by microcode using the normal registers and ALU. Does that count?
Yes, anything
that includes a dedicated multiply or divide instruction as part
of the instruction set; I suspect a lot of the early implementations fall into
the "simple shift-add" that I mentioned due to the lack/cost of silicon.
What do you mean by 'instruction set'. In particular, what do you do
about machines (PERQ, for example) that load their microocde at power-on
and thus don't have a fixed machine code instrcution set.
Whatever instructions were exposed to a programmer of the machine, I suppose.
Now that makes the classic PERQ an interesting case.
AFAIK all the standard microcodes for the classic PERQ had multiply and
divide instruciton. The hardware did not, a PERQ 1 had nothing special,
the 1A and later had the mulstep/divstep logic I mentioned in an earlier
messsage. So at the microcode level you didn't a full multiply or divide
instruction, althought you may have had something that helped.
Both machine code and microcode were available to programmers, but the
odd thing is that (at least under POS) you were not expected to write
machine code (that's what th Pascal compiler was for ;-)), but you were
expected to write microcode. The microcode machine (==hardware) is much
better documented than the 'Q machine' that the standard microcode gave
you at the machine code level.
So does that have multiply and divide or not :-)
I'm trying to build up a rough idea of how common is was though in systems
as supplied by a vendor - so I think that user-written microcode doesn't
count as such (but it's still nice to hear of systems where the user could
The standard microcode fo the PERQ doe give ou multiply and divide, but
it;'s arguable whether these are hardare instructions or not.,
have done it if they wanted and achieved better
performance than via
software routines).
background: I'm revisiting a homebrew microcoded CPU that I started
thinking about a few years ago (with the intention of making it
predominantly from LS-TTL if I can get enough parts together). I hadn't
considered hardware multiply or divide before (the intention was just to
There were parallel multiplier chips in the TTL family. Some of them were
clearly programmed PROMs. Good luck in fidning them (I have a few, which
I am hanging on to...)
have library routines in software), but if it was
relatively common on
systems between the mid-70s and early-80s then maybe I'll include
something. Simple shift-add multiply with unsigned integers is simple
enough, but I'm thinking that if I do it at all it'd be nice for it to work
with signed integers, too, so I've got some head-scratching to do :-)
You might want to take a look at how the PERQ did it. The extra logic on
the 1A CPU for mulstep/divstep is not complicated (one extra shift
register, and some control logic). And it's docuemtned.
-tony