Re: 68K/68332 Assembly/Binary Problem
- From: kevinor@xxxxxxxxx
- Date: 30 Mar 2007 11:08:25 -0700
On Mar 30, 6:49 pm, Robert Redelmeier <red...@xxxxxxxxxxxxxxx> wrote:
kevi...@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
I'm not too sure what you're saying; are you suggesting I use BCD to
represent decimal numbers?
.
- Follow-Ups:
- Re: 68K/68332 Assembly/Binary Problem
- From: Robert Redelmeier
- Re: 68K/68332 Assembly/Binary Problem
- References:
- 68K/68332 Assembly/Binary Problem
- From: kevinor
- Re: 68K/68332 Assembly/Binary Problem
- From: Robert Redelmeier
- 68K/68332 Assembly/Binary Problem
- Prev by Date: Re: 68K/68332 Assembly/Binary Problem
- Next by Date: Re: 68K/68332 Assembly/Binary Problem
- Previous by thread: Re: 68K/68332 Assembly/Binary Problem
- Next by thread: Re: 68K/68332 Assembly/Binary Problem
- Index(es):
Relevant Pages
|