With the XModem functions, you can transfer files using a data transfer protocol. The protocol uses a generally accepted technique for serial file transfers with error-checking. The XModem functions transfer packets that contain data from the files plus error-checking and synchronization information.
You do not need to understand the data transfer protocol to use the functions. To transfer a file, open the COM port, use XModemSend on the sender side of the transfer or XModemReceive on the receiver side of the transfer, and then close the COM port. The XModem functions handle all aspects of the transfer protocol.
You can treat the XModem functions as higher-level functions that perform a more precisely defined task than the functions ComToFile and ComFromFile. Use ComToFile and ComFromFile if you need finer control over the file operations. The XModem functions calculate the checksum and retransmit when they detect an error, whereas ComToFile and ComFromFile do not.