If you must have floating points there is a routine over at the MeLabs site.
The easy way for what you are doing is to drop the decimal point.
x = 2 * 1.5
would be
x = 2 * 15 / 10
Then if you are wanting to display a 3.0
65535 is the largest value for a WORD size variable. So 125000 over flows, comes back around starting at zero and the result is 59464.Code:LCDOUT, $FE;1,DEC x,".",DEC2 x//100
Bookmarks