Re: A86: Re: new ideas...


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

Re: A86: Re: new ideas...




Alright, then I could put it somewhere where there wouldn't BE a set
carry flag.  I was just showing one method of multiplication, as an
example of a simple math concept.  I didn't mean to start some long
argument, and I didn't mean that this particular routine would work in
all situations, but the main reason I like ASM is that there ARE menay
ways of doing the same thing, this is just one way.

Kirk Meyer wrote:
> 
> Um k, but why not use ADD A,A since it works all the time like you expect it
> to? In your routine, what if there was a bit in the carry flag? oops.
> 
> ----- Original Message -----
> From: Cassady Roop <croop@oregontrail.net>
> To: <assembly-86@lists.ticalc.org>
> Sent: Friday, December 31, 1999 2:45 PM
> Subject: Re: A86: Re: new ideas...
> 
> > Well, whether it's rotative or additive multiplication, is it not still
> > multiplication either way?
> >
> > 00000010  starting value =2
> > rla   -> 00000100     (4)
> > rla   -> 00001000     (8)
> > rla   -> 00010000     (16)
> > sub 2 -> 00001110     (14)
> >
> > 2*7=14
> >
> > True, this will only work with small numbers (before bit rotation wraps
> > back around to bit 0), but it still results in the desired answer.  I
> > did not, however, intend to mean that this is a generic mult routine,
> > which it definitely is not, because this would only work on a small
> > range of numbers.
> >
> > Cassady Roop


References: