How to divide in ASM
Parallel Universe
Posts: 46
Does anybody know a good way to divide in asmembly?
All I can think of is this (I'm still a bit of a newbie.):
But, as you can see, it's not that pretty--and it will take forever to run. Is there some trick with bit-shifting or something·to speed this up?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·</Parallel Universe>
All I can think of is this (I'm still a bit of a newbie.):
mov quotient, #0 divide sub dividend, divisor wc if_nc add quotient, #1 if_nc jmp #divide
But, as you can see, it's not that pretty--and it will take forever to run. Is there some trick with bit-shifting or something·to speed this up?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·</Parallel Universe>
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·</Parallel Universe>