Com2txt

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
m
(Changed primary category)
Line 1: Line 1:
 
{{FormatInfo
 
{{FormatInfo
 
|formattype=electronic
 
|formattype=electronic
|subcat=Executables
+
|subcat=Executable envelopes
 
|extensions={{ext|com}}
 
|extensions={{ext|com}}
 
|released=≤1993
 
|released=≤1993

Revision as of 15:36, 20 October 2021

File Format
Name Com2txt
Ontology
Extension(s) .com
Released ≤1993

Com2txt is a utility that converts a DOS COM file to one whose bytes all belong to certain set of ASCII characters, and which still (hopefully) 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 -r option, to recover the original file.

Contents

Disambiguation

Com2txt is not the only utility that does this sort of thing to COM files.

There is a "com2txt v1.2a by Dark Stalker 97" utility[1], which seems unrelated to the com2txt utility covered in this article.

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 "TXPPP".

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

New-alternate format is enabled with the -c option (undocumented in English). It is named something like "com-batch shared format". The format begins ":=%00%AA5$QP".

Software

Sample files

  • xpa167m.zip → *.COM (files have a customized signature)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox