AiGeneric Insert Decimal Function?
SciNemo
Posts: 91
I am trying to write a function that takes any number and inserts it into the video buffer that the AiGeneric television text driver creates.
The place I am stuck at is extracting the digits in the number to a string. Once I can do that it is a simple matter of iterating through each digit and setting the corresponding buffer position equal to the digit.
So what is a fast way to extract the decimal digits in a number, preferably in Spin?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
The place I am stuck at is extracting the digits in the number to a string. Once I can do that it is a simple matter of iterating through each digit and setting the corresponding buffer position equal to the digit.
So what is a fast way to extract the decimal digits in a number, preferably in Spin?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (localroger) : 9/28/2009 12:41:23 AM GMT
The digits end up in the data array. I am only using 1 or 2 digit numbers, so this works well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/