'''uint8 LRC(const uint8* str, const uint16 length)
Sub LRC(A() As Byte, L As Int) As Byte
'''uint8 r=0x00;
Dim R As Byte = 0
'''uint16 i=length;
'''while (i--) {
For I = 0 to L - 1
'''r^=*str++;
R = Bit.Xor(R, A(I))
Next
'''return r;
Return R
End Sub