>I was wondering whether there is any efficient way of implementing an >8-bit by 8-bit divide. My dividend is smaller than the divisor (always). >Both are positive numbers. The dividend is in the range 0-128 and the >divisor is in the range 0-256. The only way I know of is to implement it >as a 16-bit by 8-bit divide. But that takes 192 instructions which is a >lot for my application. > >Does anyone have any better idea how to do it? > On Second thought, how about... Do a look-up table for 256/b and then use the unrolled 8*8 multiply that should end up better than 50 cycles, ie approx 4x faster than the 16/8 divide. Ray Gardiner (DSP Systems) ray@dsp-systems.com http://www.dsp-systems.com private email to:- ray@netspace.net.au