Skip to content

Instantly share code, notes, and snippets.

@slavc
Created October 2, 2025 14:13
Show Gist options
  • Select an option

  • Save slavc/d7784ca0fc8a7a4c5fa1513135a0b58e to your computer and use it in GitHub Desktop.

Select an option

Save slavc/d7784ca0fc8a7a4c5fa1513135a0b58e to your computer and use it in GitHub Desktop.
How to copy files to an MS-DOS computer via COM port from a modern computer

Intro

This document describes one specific method of how to copy files to an old computer running MS-DOS from a modern computer running Linux via a COM (Serial) port using a null modem cable.

This is useful if you want to avoid having to use physical media but also don't have a network card for the MS-DOS computer or don't want to use a network card either.

Prerequisites

Steps

Prepare the MS-DOS computer

  1. Copy the TXZM software onto the MS-DOS computer using whatever means you have available, e.g. using a floppy disk.
  2. Run EDIT to create a file recv.bat with the following content, substituting comX with the COM port you are going to use on the MS-DOS computer:
@txzm com2 -b115200 -w128 -i -p -h -r download

Prepare the main Linux computer

  1. Install minicom.
  2. Plug in the USB to RS-232 adapter if your computer doesn't have a built-in COM (Serial) port.
  3. Run sudo minicom.
  4. Press Ctrl+A, O; go to 'Serial port setup' and select /dev/ttyUSB0 as 'Serial Device' if using the USB adapter, or one of the /dev/ttyS* if using the built-in COM port.
  5. In 'Serial port setup', also configure 'Bps/Par/Bits' to be '115200 8E1'.
  6. In 'Serial port setup', also enable 'Hardware Flow Control' and 'Software Flow Control'.
  7. Press Ctrl+A, O; go to 'File transfer protocols', modify 'zmodem' 'Program' to be sz -vv -b -l 1024 -w 1024. These are the settings that I found to yield the highest bitrate with no errors, but you can experiment with them by reading man sz.
  8. Press Ctrl+A, O; select 'Save setup as dfl', so you don't have to configure all of this every time you start minicom.

Transfer files

  1. On MS-DOS computer, run the recv.bat you created earlier.
  2. On Linux computer, run sudo minicom, then press Ctrl+A, S; select 'zmodem', use minicom's interface to navigate the filesystem, select the files and initiate the transfer.
  3. Once the transfer is complete, you should see the files on the MS-DOS computer in the 'DOWNLOAD' directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment