Just think about what you need to accomplish in each step as I have outlined in my previous reply. There are probably more elegant ways of doing this but I've thrown this together in the short time available to me today (I have kept comments to a minimum so you can work-out what I’m doing in each section)...

Lets break the job down into steps...

We start with Knots array holding an ASCII numeric string with a Decimal place somewhere within it.

CounterA var Byte
DataA var Word
DataB var Word
Knots var Byte [6]
KnotsW var Word
Multiplyer var Byte
MPH var byte [6]
MPHW var Word

'
' Step 1
' This section loads the Word variable KnotsW
' from the ASCII String variable Knots
' and ensures there are ALWAYS 2 decimal places
' regardless where the decimal place is in the string.
' Any more than 2 decimal places are truncated.
' Any less than 2 decimal places are multiplied up.
'
KnotsW=0
Multiplyer=$FF
For CounterA=0 to 5
If Knots(CounterA)=$2E then
Multiplyer=0
Else
If Multiplyer<2 then
KnotsW=(KnotsW*10)+Knots(CounterA)-48
If Multiplyer<5 then Multiplyer=Multiplyer+1
Endif
Endif
Next CounterA
If Multiplyer=$FF then Multiplyer=0
DecimalAdjust:
If Multiplyer<2 then
KnotsW=KnotsW*10
Multiplyer=Mutiplyer+1
Goto DecimalAdjust
endif
'
' Step 2
' This next section converts to MPH
' The resultant is an Integer called MPHW
'
DataA=115
DataB=KnotsW*DataA
MPHW=DIV32 100
'
' Step 3
' Finally you want individual ASCII Bytes
' So we'll load our result MPHW into the array MPH
' and Right-justify with Leading Zero Suppression
'
MPH[0]=MPHW DIG 4
MPH[1]=MPHW DIG 3
MPH[2]=MPHW DIG 2
MPH[4]=MPHW DIG 1
MPH[5]=MPHW DIG 0
DataA=0
For CounterA=0 to 5
If CounterA=3 then
MPH[3]=$2E
Else
If CounterA=2 then DataA=1
If MPH[CounterA]=0 then
If DataA=0 then
MPH[CounterA]=$20
Else
MPH[CounterA]=MPH[CounterA]+48
DataA=1
Endif
Endif
Endif
Next CounterA

At the end we have Miles Per Hour ALWAYS with 2 decimal places. If you want variable decimal places, then remove the DecimalAdjust section, and use the Multiplyer variable accordingly when loading your MPH array.

Now it wasn’t that difficult to break-down into steps was it?

I've not tested this code, but I'm sure you will once you've worked out the logic.

Melanie