Calculate a CRC over a string

The syntax of the "C" command is:
CRC string
  where there is a space between "CRC" and the string
  string is simply a NULL-terminated character string
Notes:
  No distinction is made between uppercase and lowercase.
  The first BYTE (i.e., character) after "CRC" is omitted from the calculation.
  The terminating NULL is included in the calculation.

The CRC (Cylic Redundancy Check) is a way of detecting an error in block of data. It calculates a numeric value over the data block which can be used for comparison later to see if anything changed. This command begins by skipping the first byte after "CRC", whether it is a space or any other character. The NULL string terminator is included in the calculation.

This is present in the Operating System Commands because a 16-bit CRC calculation was needed for data transmission, the "C" command was not being used for something else, and it was found to have occasional other uses.
>CRC 1
The CRC over "1" (2 bytes) is 0x2014
>CRC 12
The CRC over "12" (3 bytes) is 0x6F35
>CRC 123
The CRC over "123" (4 bytes) is 0xE7BB
>CRCx123
The CRC over "123" (4 bytes) is 0xE7BB
>CRC Longer test string
The CRC over "Longer test string" (19 bytes) is 0xA75F
>                                                                               
The most FLASH codespace was used by the output strings. This command is a good candidate for a Command Extension replacement.

See also:
  The CRC and RunningCRC system subroutines and CRC-16 (or CRC-16-IBM.)