Re: A86: base 10 display of hex


[Prev][Next][Index][Thread]

Re: A86: base 10 display of hex




actually, if X is HLIX, it performs X=(2X-1) 32 times and then does mod
10 on H. This is how TI did it in their ROM routine (except it doesn't
display numbers larger than $09FFFF). i think i see how it works... it
is kind of hard to explain.

rabidcow@juno.com wrote:
> 
> On Wed, 01 Jul 1998 15:52:43 -0600 Kirk Meyer <_@ibm.net> writes:
> >
> >DAA would involve BCD numbers, which I cannot store the population or
> >money in because of speed.
> >
> >essentially this code performs this operation on any number X:
> >
> >HLIX = (16777216*X-16777215);
> 
> hlix = x
> hlix = $01000000 * hlix - $00ffffff
> $0200-$00ff=$0101
> 
> wouldn't that do this?:
> h = x - 1
> l = i = 0
> x = 1
> 
> >H %= 10;
> 
> -josh
> 
> _____________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com
> Or call Juno at (800) 654-JUNO [654-5866]

-- 

=====================================
=                                   =
=   Kirk Meyer (mailto:_@ibm.net)   =
= http://www.bigfoot.com/~kirkmeyer =
=  http://simcommunity.home.ml.org  =
=                                   =
=   "Set your affection on things   =
=    above, not on things on the    =
=      earth."  Colossians 3:2      =
=                                   =
=====================================


Follow-Ups: References: