Hi, You could try inline assembly. But I think having the code: long var; var=var/32; will generate the shifts and not using the div function. The function shift_right() will shift an array or structure one bit at a time and may not generate a tight code. regards, Reggie -- e-mail: rberdin@bigfoot.com ICQ#: 31651436 URL: http://www.bigfoot.com/~rberdin Lawrence Lile wrote: > > I'm trying to divide a 16 bit variable by 32. Instead of invoking a > cumbersome divide routine I'd like to just shift right 5X. CCS seems to > have a couple of functions that do something like this but I can't seem to > figure out how they work. Anybody know a good way to do this?