Dim in As File
If File.Exists(File.DirRootExternal,"Eph.dat")=True Then
If File.size(File.DirRootExternal,"Eph.dat")>0 Then
Dim buffer(File.size(File.DirRootExternal,"Eph.dat")) As Byte
in = File.OpenInput(File.DirRootExternal,"Eph.dat")
count = in.ReadBytes(buffer, 0, buffer.length)
byteCnt=count
Dim bc, bcB As Byte
Dim c, cB As Int
'c=0:cB=0
For i=0 To buffer.Length-1
'c=c+(Bit.ParseInt(buffer(i),16)+255)
bc=Bit.xor(bc,buffer(i)+255)
If i<=9999 Then bcB=Bit.Xor(bcB,buffer(i)+255)
'cB=cB+(Bit.ParseInt(buffer(i),16)+255)
Next
c=bc Mod 256
cB=bcB Mod 256
'c= c-(Round(c /256)*256)
'cB= cB-(Round(cB/256)*256)
'cB=cB Mod 256
Log("csum: " & c & "/ csumB: " & cB)
in.Close
End If
End If