Hi Sean, Sean Breheny wrote: > DIV instruction on a simple 16 bit processor. It should take a 16bit > dividend and an 8bit divisor, and return an 8 bit quotient and an 8bit > remainder. Dividing 16 bit number with an 8 bit divisor could result in an 16 bit quotient if the divisor is low value. > At 09:14 AM 4/18/99 -0700, you wrote: > >The fastest 8 by 8 divide is Andy Warren's 81-cycle screamer. Bob F. Scott, I haven't seen Andy's routine but I've cooked up one with much lesser cycle time: ;y = y/x remainder a ;13 words, 76 cycles: (untested) div8: movlw 8 movwf cnt clrf a clrc ;may not be needed? loop rlf y,f rlf a,f movf x,w subwf a,w skpnc movwf a decfsz cnt,f goto loop rlf y,f regards, Reggie -- e-mail: rberdin@bigfoot.com ICQ#: 31651436 URL: http://www.bigfoot.com/~rberdin