In the hex file generated by the Lattice Diamond tool for L-ASC10 device, the line before the last line is the checksum.
The following is an example hex file content for L-ASC10 device:
00
e1
FFFFFFFFFFFFFFFF
FFFFFFFF4E114E11
4E114E11FC009CC7
009CC7009CC7009C
C7009CC7009CC700
9CC7009CC7009CC7
009CC70000000400
4770000000C000FF
814770000000C000
FF81476F000000E0
00FF81401C401C40
1C401C000000FFFF
C0FFAAAAFAFFFCFF
FFFFFFFFFFFFFFFF
2F75
FFFFFFFF
In this file, 2F75 is the checksum for line#3 to line#17.