<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 25 Jun 1993 13:44:31 +0100 (BST)
From   : "I Stephenson" <ian@...>
Subject: Arithmetic routines

Has anyone got a good set of signed and unsigned 32 bit integer multipication,  
division and modulus routines they can let me have.

I need these to complete a C compiler I've been working on. It's got a number  
of bugs still, but it generates (very bad) 6502 code from full ansi C ( minus  
floating point - anyone got those routines?). I just added structures this  
morning, so once I've got some arithmetic routines I'll put out a beta version  
on shiraz. It can't handle multiple files yet eiter, but I can fix that easily  
enough once I've debugged the rest of the system.

I've got a couple of multipication routines (in books) that I could use, but  
I'm too lazy to type them in, and they're not quite suitable anyway. Idealy the  
routine should NOT calculate anything outside the 32 bits ie a 64 bit result  
would be just thrown away.

The bad news is that I the current version is VERY unlikely to be able to  
compile itself, as the code produced is far too big - you'll need a unix or  
decent(!) pc to host it from. However I haven't started doing any optimising  
yet so I expect to be able to improve things dramatically.

Ian
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>