Re: A86: Sorry Dux. =-|


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

Re: A86: Sorry Dux. =-|




oh, picky, picky.  sure it works, you just have to put the number in b
backwards...

-josh

On Mon, 10 Aug 1998 00:26:01 -0600 Dux Gregis <assets@eden.rutgers.edu>
writes:
>
>> ;African Swallow Algorithm_________________________
>
>I don't know if you tested this or not, but this doesn't work.  I'll 
>try
>to explain why:
>
>The algorithm works like this:  Shift the smaller number right until 
>it
>becomes zero, and each time you shift the smaller #, shift the larger
>number left.  At the end of this, all the numbers in the larger # are
>added together when bit 0 of the smaller number is set.  But instead 
>of
>waiting until its done calculating, you can add it to another register
>pair when it carries, so long as you return after it has checked the
>carry.
>Assuming that b is the smaller # and hl is the larger number and de is
>used to collect the shifted hl values:

>
>You are using hl as both the collector and the left shifter and 
>getting
>the wrong numbers.  (you have good intentions of course :-)
>


_____________________________________________________________________
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]


Follow-Ups: References: