From mboxrd@z Thu Jan 1 00:00:00 1970 From: dfawcus+lists-coff at employees.org (Derek Fawcus) Date: Mon, 25 May 2020 10:12:18 +0100 Subject: [COFF] Pointers for maths routines in "assembly" In-Reply-To: <20200525042726.GA685@minnie.tuhs.org> References: <20200525042726.GA685@minnie.tuhs.org> Message-ID: <20200525091218.GB85793@clarinet.employees.org> On Mon, May 25, 2020 at 02:27:26PM +1000, Warren Toomey wrote: > > Next question, is it possible to do 16-bit division when the hardware > can only do 8-bit divided by 8-bit. Ditto 16-bit modulo with only 8-bit > modulo? I believe so. I've seen code for a 68000 to do division of 32 bit values when the chip only provides for division of 16 bit values. So the same approach should apply for extending an 8 bit divide to provide 16 bit division. The book I have this in attributes the algorith to a Dr. Arthur Norman. See https://archive.org/stream/Programming_The_M68000_1983_Adn-Wesley_Publishing_Company/Programming_The_M68000_1983_Addison-Wesley_Publishing_Company_djvu.txt Section 5.8 & 5.9, page 99 in the actual printed book. DF