|
Atari coding BBS
Re: DSP DIV : I'm lost |
Posted by: mikro
|
Jul,03.2013-07:03
|
I'm pretty sure the master aka Doug :) will give you an exhausting explanation and mathematical background, for now you can stick with my lame answer -- don't forget the div instruction is for FRACTIONAL division. That means rep #24 works in cases when source < destination, for example 1/100. In that case you can really do (IIRC):
andi #$fe,ccr ; clear carry
move #1,a
move #100,y0
rep #24
div y0,b ; result in b0
Then signed numbers, S >= D come into play and that's where the real fun begins :)
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|