Dual precision numbers
ScottL
Posts: 14
I have an application where I need to display a decimal number greater than 65535. (word) Does anyone have an idea of how to collect numbers greater than 65535 and display them using LCDOUT?· -Scott
Comments
Here are some double precision math routines which should do the trick, thanks to Dr. Tracy Allen:
http://www.emesystems.com/BS2math6.htm
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
a var nib(8)
b var nib(8)
c var byte
i var nib
add:
c = 0
for i=0 to 7
c = a + b + c
if c >= 10 then carryIt
a = c : c = 0
goto fini(expletive)
carryIt:
a = c - 10: c = 1
fini(expletive):
next
return
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows