Re: 68K/68332 Assembly/Binary Problem



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


.



Relevant Pages

  • Re: 68K/68332 Assembly/Binary Problem
    ... operations and conversions with numbers in Hex, ... 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 ...
    (alt.lang.asm)
  • Re: XQ and ->Qpi bug on large X
    ... Prof. W. Kahan has made valuable contributions to HP calculators ... and have been discussing the UserRPL RND command instead, ... anyone who wants to have a "round to even" UserRPL function ... using the built-in abilities of other commands. ...
    (comp.sys.hp48)
  • Re: HP-50g quick reference??
    ... Sadly, also compared with the 48sx, the documentation is abysmal. ... familiar commands so you could get out the reference manual and get to ... removed information not useful for an hp50g quick guide, ... commands only available in those calculators, ...
    (comp.sys.hp48)
  • Re: Guess the data encoding!
    ... Secondly, I've done some digging and I've figured out how the software encodes integers, but not floating points. ... When it sends commands to change the settings an example is: ... So 10000 in hex is 2710, which gets sent in the "wrong" order. ... When the software is collecting data, ...
    (comp.soft-sys.matlab)
  • Re: Convert hex data to numeric format
    ... my variable was read from a file and contains the number in byte format (as ... When I used the format & string map commands (and ran via double-click of ... symbol was actually a small square (an unprintable character - which makes ... sense as hex 03 is unprintable). ...
    (comp.lang.tcl)