Com2txt

Com2txt is a utility that converts a DOS COM file to one whose bytes all belong to a certain set of ASCII characters, and which still has the same functionality. It was developed by Naoyuki Nide. Most of the information about it is in Japanese.

It's a silly hack, but it had some practical uses, such as for embedding a COM file in a Batch file, email, etc.

It has a  option, to recover the original file.

Disambiguation
Not to be confused with Com2txt (Dark Stalker).

For other software with a similar name or function, see Executable envelopes.

Identification
Assuming version 1.11 is the last, and that it can decode all the formats, there are a total of three formats, which we'll call old, new-default, and new-alternate.

Old files (e.g. from v1.00) start with "".

New-default files (e.g. from v1.11) start with a roughly 200-byte prefix that begins "" (see the HDR_DATA.C source file). The signature "" also appears in the standard prefix, but is less reliable for format identification.

New-alternate format is enabled with the  option (undocumented in English). It is named something like "com-batch shared format". The format begins "".

Software

 * [ com2txt v1.11] (DOS binary + source code)
 * A copy at GitHub

Sample files

 * [ xpa167m.zip] → *.COM (files have a customized signature)