comp.lang.ada
 help / color / mirror / Atom feed
From: "Tarjei T. Jensen" <tarjei.jensen@kvaerner.com>
Subject: Re: implementing software unsigned divide
Date: Tue, 8 May 2001 09:44:31 +0200
Date: 2001-05-08T09:44:31+02:00	[thread overview]
Message-ID: <9d8854$oll16@news.kvaerner.com> (raw)
In-Reply-To: uae4oomya.fsf@gsfc.nasa.gov


Stephen Leake wrote in message ...
>I'm porting GNAT to a 16 bit microprocessor that does not provide a
>hardware instruction for unsigned divide (it has multiply and signed
>divide, both 16 and 32 bit). Can anyone provide a reference to a book
>that discusses how to do this, and/or an algorithm that does it? I've
>looked in Knuth, and did an initial web search, and haven't found
>anything.

Why not do it the way you did at school? There is nothing special about
binary numbers.

You can have a look at old books on assembly programming. Some of them
implemented extended arithmetic. Some even did floating point. The worst
that could happen is that you have to scale from a 8 bit to a 16 bit
machine.


Greetings,






  parent reply	other threads:[~2001-05-08  7:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-07 21:42 implementing software unsigned divide Stephen Leake
2001-05-08  6:04 ` Jacob Sparre Andersen
2001-05-08  7:44 ` Tarjei T. Jensen [this message]
2001-05-08 13:18 ` Ted Dennison
2001-05-08 15:24 ` Tucker Taft
2001-05-08 21:20   ` Stephen Leake
2001-05-09 18:00     ` Tucker Taft
2001-05-10 15:54       ` Stephen Leake
2001-05-13 23:17       ` Kenneth Almquist
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox