Phil wrote: > I need assembly code to solve this formula: > > angle = a + (b * count) > > where > > a = 82.9 > b = -0.2 > count is a ten bit integer > angle is also an integer, This first thing you need to do is determine what the range and precision requirements are for each value. Once you know that, you can decide on a representation. You may not need floating point at all. It is often convenient to represent angles as unsigned integers where 2**N represents a complete circle. That makes wrapping to the first circle trivial. You let things overflow as they want, then keep just the low N bits of the result. You've already said that COUNT is a 10 bit integer, so we need to know the min/max range of A, B and ANGLE, and their precisions. > so I have to add on .5 to the result Why? Nothing else you said justifies this. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body