Re: A82: fast multiply...
[Prev][Next][Index][Thread]
Re: A82: fast multiply...
On Sat, 03 Aug 1996 "Lars Ahlzén" <lars.ahlzen@swipnet.se> writes:
>Hello!
>
>[...]
>
>(by the way: is there a fast way for integer division, too?)
The fastest division I know of is in the calculator's ROM. When
you call UNPACK_HL, it divides HL by 10 and puts the quotient in
HL and the remainder in A. You can also divide by other values
by loading the divisor into A and then calling UNPACK_HL+2. The
routine in ROM is very fast. I'm not sure if it will work for
every value, but it could handle 5000/50, 2048/4, 1000/55....
--
Patrick Davidson (ariwsi@juno.com)
Visit my home page! Stuff for Amiga, TI-85, TI-92, even DOS!
http://www.calweb.com/~kwdavids/patrick/
http://www.toptown.com/hp/ariwsi/
References: