Re: A86: ASM Programming Test - div 3


[Prev][Next][Index][Thread]

Re: A86: ASM Programming Test - div 3




Hmm, a look-up table.  My favorite.  Problem is, I don't see an easy way to
do division with a table.  Multiplication is easy, division doesn't seem to
be.  I see two possible ways.  One way would be to store all numbers from 0
to the max.  The number at that position would be the quotient.  This would
take up alot of memory but would be fast, and you could also use it to store
remainders (that would get a bit tricky, but possible).  The other way (that
I can see) would be to have all the dividends in the table (assuming they
would always be multiples of the divisor).  You would search for the divsor,
and the position in the table woudl be the quotient.  This would take less
space, but would be slower and more limited.

If anyone knows a better way, please let me know.

-----Original Message-----
From: ZeromusMog@aol.com <ZeromusMog@aol.com>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Wednesday, December 09, 1998 11:52 PM
Subject: Re: A86: ASM Programming Test - div 3


>
>In a message dated 12/9/98 9:20:04 PM Pacific Standard Time,
electrum@tfs.net
>writes:
>
>> For small numbers, I'd say forget it
>>  (though you are welcome to try).
>
>Perhaps for really small numbers, some sort of table would be faster?