The following source code will compile under gcc for Linux or the DJGPP gcc package for DOS.
For example, under gcc for Linux, compile as follows:
gcc -o vmcm2asc vmcm2asc.c
Under gcc for DOS, as follows:
gcc -o vmcm2asc.exe vmcm2asc.c
vmcm2swab contains code to skip the first 20000H bytes of the file created
by reading the FLASH card directly in a laptop (see below). If you use XMODEM to dump
the data, the first byte of the file is the first byte of data - you will need to modify
the vmcm2swab.c code and recompile. Refer to
VMCM2 Record Format.
Note that if you retrieved the binary data using the serial console, the XMODEM
transfer will pad the final block transferred (if necessary) to equal 128 bytes. Thus the final
ascii "record" may be garbage. Be sure to check for a valid record if using any sort of
automated processing. One easy check is to see if the first byte on a line is a valid hour;
a value of 255 indicates this is a "padded record" due to the XMODEM transfer.