Dim ch(45) As Byte
Dim chr As Byte
Dim i As Byte
Hseropen 9600
For i = 0 To 41
ch(i) = LookUp("M0TVU,n,192633.0,5233.736,00153.799,00181"), i
Next i
'check we have the string
For chr = 0 To i
Hserout ch(chr)
Next chr
'now create a value which is the crc_16 checksum
for j= 0 to i ' loop around the array length is as was stored earlier
crc=crc xor ch(j)
if(crc & 1) then ' i'll need to oshon this
crc = ShiftRight(crc, 1) XOR &HA001 'what number is it xor'd with? should this be crc=crc + .......
else
crc = ShiftRight(crc, 1) 'should this be crc = crc + .......
next i
'now add this value to the end of the string
'now output the whole string.