View Single Post
Old Nov 25, 2011, 10:56 AM   #20
Completely Bonkers
2000 Posts
 
Completely Bonkers's Avatar
 
Join Date: Feb 2007
Posts: 2,415 (1.05/day)
Thanks: 582
Thanked 533 Times in 374 Posts

System Specs

@frick, 1986/87 I think

@qubit. No. Z80 had no Multiply. You had to do it with a series of adds and binary rotates (multiply by 2 in binary means shift all 1 and 0 to the left).

Here is someone showing you how to do it on the Z80
http://sgate.emt.bme.hu/patai/public...ide/part4.html

IIRC, the Comodore 64 used a "special" 6509 processor called the 6510 which DID have a simple 8bit hardware multiply for one of its registers. It wasnt a "true" multiply, but it helped the coding significantly, meaning long-hand multiply as shown in the link above could be simplified and be about 4-5x times quicker. DIVIDE was still a PITA.

Remember that 8 and 16 bit integer multiple is EASY PEASY compared to the code needed on 8-bit processors to do floating point! Now THOSE PROGRAMMERS I really admire.

http://6502.org/source/floats/wozfp1.txt / http://6502.org/source/floats/wozfp3.txt

Steve Wozniak (and friends). Genius.
__________________
... some things in life just drive you bonkers. Especially the rubbish you see in forum posts

Last edited by Completely Bonkers; Nov 25, 2011 at 11:01 AM.
Completely Bonkers is offline  
Reply With Quote
The Following 2 Users Say Thank You to Completely Bonkers For This Useful Post: