Re: 68K/68332 Assembly/Binary Problem
- From: Robert Redelmeier <redelm@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 18:46:14 GMT
kevinor@xxxxxxxxx wrote in part:
On Mar 30, 6:49 pm, Robert Redelmeier <red...@xxxxxxxxxxxxxxx> wrote:
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.
I'm not too sure what you're saying; are you suggesting I
use BCD to represent decimal numbers?
I'm suggesting you use BCD to reprsent all numbers (when in
decimal mode), and do your calcs digit-wise in BCD. This makes
them much easier to display than converting from 64bit binary.
The decimal number number 129 is stored as 00000081h in binary
but as 00000129h in packed BCD.
When in hex/bin-mode, of course you can use binary to represent
all numbers because conversion is easy. Your only hassle
then is when the calculator is switched between modes, a relatively
infrequent occurance compared to the number of numbers displayed.
-- 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
- Re: 68K/68332 Assembly/Binary Problem
- From: Robert Redelmeier
- Re: 68K/68332 Assembly/Binary Problem
- From: kevinor
- 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
|