A86: Re: math routines
[Prev][Next][Index][Thread]
A86: Re: math routines
> From: Cassady Roop <croop@oregontrail.net>
>
> I think what he's trying to say is you should make a page dealing
> with
> fundamental mathematic theories, applied through assembly. Like
> simple
> multiplication, for example, which can be done with bit shifts like
> this:
>
> ;multiply n by 7
> ld a, 2 ;n=2
> ld b, a ;store value of n
> rla ;n*2
> rla ;n*4
> rla ;n*8
> sub b ;(n*8-n) or n*7
> ;a now holds result of n times 7. n=2, so value in A is 14.
>
> Stuff like this is simple but seems incredibly confusing to
> beginners.
> It is true that though there are plenty of tutorials out there
> covering
> stuff like sprites and variable access and such, there is a great
> lack
> of simple math tutorials. Once those tutorials are done, then you
> could
> move on to more advanced stuff like trig math and accessing the
> built-in
> higher math routines of the 86 from an assembly program.
oh, sweet. i'll get right
to it.
jimi malcolm
mailto:malcolmj1@juno.com
http://guide.iwarp.com