+ io.write( ('BLOCK 0-1 : %04x = %04x \n'):format(revcrc,computeCrc16(test1)))
+
+ -- Checksum Typ 1 BLOCK 9
+ local block9 = blocks[9]:sub(8,35)
+ test1 = ('%s0500'):format(block9)
+ crc = blocks[9]:sub(36,39)
+ revcrc = reverseCrcBytes(crc)
+ io.write( ('BLOCK 8 : %04x = %04x \n'):format(revcrc,computeCrc16(test1)))
+
+ -- Checksum Typ 1 BLOCK 37
+ local block37 = blocks[37]:sub(8,35)
+ test1 = ('%s0500'):format(block37)
+ crc = blocks[37]:sub(36,39)
+ revcrc = reverseCrcBytes(crc)
+ io.write( ('BLOCK 36 : %04x = %04x \n'):format(revcrc,computeCrc16(test1)))
+
+ -- Checksum Typ 2
+ -- 10,11,13
+ test1 = blocks[10]:sub(8,39)..
+ blocks[11]:sub(8,39)..
+ blocks[13]:sub(8,39)
+
+ crc = blocks[9]:sub(32,35)
+ revcrc = reverseCrcBytes(crc)
+ io.write( ('BLOCK 10-11-13 :%04x = %04x \n'):format(revcrc,computeCrc16(test1)))
+ -- Checksum Typ 3
+ -- 15,17,18,19
+ crc = blocks[9]:sub(28,31)
+ revcrc = reverseCrcBytes(crc)
+ test1 = blocks[14]:sub(8,39)..
+ blocks[15]:sub(8,39)..
+ blocks[17]:sub(8,39)
+
+ local tohash = test1..string.rep('00',0xe0)
+ local hashed = computeCrc16(tohash)
+ io.write( ('BLOCK 14-15-17 %04x = %04x \n'):format(revcrc,hashed))
+end