On 11 Nov 2007 at 10:37, dwight elvey wrote:
To my knowledge, I don't know if any of the
assemblers had
a CRC calculator built in. The final check number was most
likely calculated after the assembly and just added to the code.
If in the listing, this may have been a second pass through
the assembler.
MAC certainly didn't have one. I assume that the last 2 bytes of the
ROM were the zero-CRC-makers. The "quick and dirty way" to get a
zero sum is to compuate the CRC for the first n-2 bytes of the size n
ROM, then iterate through the 65536 possible 16-bit combinations of
the "corrector" stopping when a zero CRC is hit. It shouldn't take
long, particularly if you're using an emulator on a modern PC.
You could also work out the reverse polynomial, but that sounds like
too much work for what probably will amount to a one-off deal.
Cheers,
Chuck