Re: 68K/68332 Assembly/Binary Problem
- From: Robert Redelmeier <redelm@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 17:49:54 GMT
kevinor@xxxxxxxxx wrote in part:
It's a calculator that runs on an MC68332 processor and performs
operations and conversions with numbers in Hex, Decimal and Binary.
The problem I'm having is with the limitations of the CPUs arithmetic
commands; the program needs to work with 64-bit signed integers
however the CPU commands are limited to mainly 32-bit values.
Is there a way to convert decimal to binary/hex and back
without needing large division and multiplication commands? I've
considered manually coding division and multiplication subroutines
but after designing a multiplication algorithm which takes way
too many clock cycles; is there another way to proceed?
Classically, calculators work in decimal because of the
difficulty doing interconversion compared to the ease of doing
multiple-word calcs which were usually required anyways.
I/O being more important than the actual calculations.
COBOL also works this way. When it works at all.
So a calculator mostly would be working BCD arithmetic.
If yours has to work in hex & bin, it it relatively easy
to program those. And you are doing multi-word anyways.
-- Robert
.
- Follow-Ups:
- Re: 68K/68332 Assembly/Binary Problem
- From: kevinor
- Re: 68K/68332 Assembly/Binary Problem
- References:
- 68K/68332 Assembly/Binary Problem
- From: kevinor
- 68K/68332 Assembly/Binary Problem
- Prev by Date: 68K/68332 Assembly/Binary Problem
- Next by Date: Re: 68K/68332 Assembly/Binary Problem
- Previous by thread: 68K/68332 Assembly/Binary Problem
- Next by thread: Re: 68K/68332 Assembly/Binary Problem
- Index(es):
Relevant Pages
|