Shop OBEX P1 Docs P2 Docs Learn Events
How to divide in ASM — Parallax Forums

How to divide in ASM

Parallel UniverseParallel Universe Posts: 46
edited 2008-06-18 15:44 in Propeller 1
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.):
               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

Sign In or Register to comment.