Hi:

I want a code to multiply two number that they are in BX and DX without using MUL and just using Add action.


Thanks in advance
Posted on 2005-06-12 14:53:08 by silvercover
You could clear AX then add BX to AX, DX times.
Posted on 2005-06-12 15:12:30 by stormix
Will end up being slower than a regular multiply... hmm, add-only mutiply and 16bit code? ^_^
Posted on 2005-06-12 16:26:44 by f0dder

Will end up being slower than a regular multiply... hmm, add-only mutiply and 16bit code? ^_^

Sound like a homework to do ;)
Posted on 2005-06-12 20:57:54 by ti_mo_n


Will end up being slower than a regular multiply... hmm, add-only mutiply and 16bit code? ^_^

Sound like a homework to do ;)

Aww...  why aren't any courses offered where i attend offer such fun courses?  Actually, that course with PDP-11 assembly was kind of fun...  :P
Posted on 2005-06-12 22:29:34 by jademtech
Psuedo Code:

set cx = 0
for i = 0 to 15 ; (# of bits in dx)
    if bit i of dx = 1 then cx += bx

    shift bx left by 1
next

Now cx = bx*dx
Posted on 2005-06-13 08:04:35 by Eóin