PDA

View Full Version : 32 bit Division without DIV32



CosMecc
- 23rd October 2006, 12:00
Hi
I've a problem, I'he to make this math:
(a*b)/c
so a*b because could be a 32 bit number, I've to use DIV32 command, but in may code a couldn't disable the interrupts.

Does any one know a method to make a 32 bit numeber division without DIV32?

Thanks

Darrel Taylor
- 23rd October 2006, 19:31
Are you using ON INTERRUPT, or ASM interrupts?

If ASM, you don't need to worry about turning them off.

CosMecc
- 24th October 2006, 08:36
Unfortunately I use ON INTERRUPT

Darrel Taylor
- 24th October 2006, 09:01
Well, if you can't disable the interrupts long enough to do a multiply and divide, then you shouldn't be using ON INTERRUPT. There are many statements that will take even longer.

For Basic Language interrupts that won't interfere with DIV32, and won't wait for PBP, check this out.

DT_INTS-xx
http://www.pbpgroup.com/modules/wfsection/article.php?articleid=19

CosMecc
- 25th October 2006, 08:48
Thanks for this link, it is very interesting.