Dec 252017
This program is used for turning an .COM format executable into a text file suitable for trasmission over text-only networks such as BITNET or UseNet.
File COMT010D.ZIP from The Programmer’s Corner in
Category Word Processors
This program is used for turning an .COM format executable into a text file suitable for trasmission over text-only networks such as BITNET or UseNet.
File Name File Size Zip Size Zip Type
COMT.COM 13554 13101 deflated
COMT.DOC 8481 3821 deflated
COMTARC.BAT 1038 368 deflated
COMTARC.COM 3016 1978 deflated
COMTSRC.ZIP 16380 14541 deflated
LICENSE.DOC 595 344 deflated

Download File COMT010D.ZIP Here

Contents of the COMT.DOC file

COMT is Copyright 1991, 1992 Alexander Pruss. Some rights reserved.
All use is permitted limited only by the law of the land and natural law.
I hereby specify that only the exact version I produced belongs to me.
Any modification, however trivial, renders my rights to this null and void.
Thus, if you change this copyright message this program shall no longer
belong to me. I permit any such modification, and I permit any removal
of credit to myself for this programme. NO WARRANTY OF ANY KIND IS GIVEN.
Interpretation of natural law is left to the user's conscience.

COMT version 0.10d

This program is used for turning an .COM format executable into a text
file suitable for trasmission over text-only networks such as BITNET or
UseNet. Unlike other such programs like UUENCODE, it is totally
bootstrapped and does not require any decoder.

The executables processed with COMT if originally in .COM format will
still be executable, even after they are turned into a text file. Of
course the output will be longer than the input, by about 35% for large
files, more for smaller. This means that after they are sent, possibly
embedded in a message, they can be simply extracted with a text editor
and run as-is with no decoding needed. The only thing to be remembered
is that by the time the file ends up again on a PC, it must be a PC-text
file, which generally means it has to be transferred always in text
mode. It is easy to find out whether a file is a PC-text file by just

TYPE filename

and seeing if the lines are neatly aligned at the left hand margin.

Here is a sample COMT output file:

The text in between the two '--' lines can be snipped off into a file, starting with the 'ENC.COM.' line inclusive and ending with
the 'Z' line, also inclusive and then upon Hello.COM being executed, a
'Hello, World!' message would be displayed.

Normally, when a .COM file is to be encoded, the line:

comt filename

is given and is replaced by a COMT encoding of itself.

WARNING: if the output file is longer than 63kB it will not be
runnable. COMT does not at present warn of this. DOS will give an
out of memory message if you try to run. Use the comt -x filename
command to reconstruct the original file.

To encode into a different name use

comt filename outname

The extensions .COM are default on input and output in this case.

Since the file is often supposed to be transmitted by mail, you can
automatically include instructions on how to cut out the program.
Simply include the -w flag,

comt -w filename [outname]

and the file filename[.COM] will be converted into a file filename.ASC
or outname[.ASC] depending on whether you specified an outname. This
file will include directions on how to extract the input file
filename[.COM] inside. This file will be mentioned in the wrapper by
name as filename[.COM]. If you want a different name, use

comt -w -nnewname filename [outname]

where newname is the name you want the wrapper to use for the file.

By default one of two encoding methods is chosen depending on the size
of the input file. For small files a 1->2 method is chosen where each
byte is encoded as two bytes, and the bulk of the output consists of
uppercase letters. For larger files a 3->4 method is used where three
bytes are encoded as four. I can see no reason for overriding the
choice, unless you want the output to be larger than usual (but see BUGS
section for mention of marginal cases.) The 3->4 method is obviously
more efficient for larger files, but it suffers from a longer decoder at
the beginning, for smaller files. To specify 1->2 encoding throw in a
-1 flag, and for 3->4 encoding a -3 flag as in:

comt -1 inname

You can extract a COMT-processed file into the original. This may be
useful if you want to save disc space or the miniscule time needed to
decode the executable. Of course, the COMT-processed executable can be
run just as well as the original, if you wish.

If the file filename contains the COMT-processed file, put

comt -x filename [outname]

to extract it into the original. By default the extension of filename
is .COM and outname is filename.COM. Remember, to do this you need not
take the file out of any message wherein it might be sitting. If more
than one COMT-processed file is in filename, the first will be
extracted. Note in particular that if you use comt -w to create
filename.ASC, then

comt -x filename

will recreate filename.COM. Further, running

comt -x comt.doc hello

on this documentation file, will create, as given in the
example above, and this will be decoded into its pre-COMT


If you have several files you want to bundle into a self-extracting
COMT-style plain-text archive, you have to glue them together first into
a self-extracting .COM file. This can be done at present with only one
archiving utility, LHARC. (All others I know create .EXE files; LHARC
creates .COM files if the output is under 64kB.) DO NOT USE LHA, AS IT
DOES NOT PRODUCE .COM FILES. Mr. Robert Jung informs me that in the
future his ARJ archiver may produce .COM self-extracts, but do not hold
your breath. Here is some info on the LHARC I use:

LHarc version 1.13 (Test version) Copyright (c) Haruyasu Yoshizaki, 1988-89.
================================================================ 05/04/89 ===
<<< High-performance file-compression program >>>

You can simplify the process by using the COMTARC.COM or COMTARC.BAT
program. If you have LHARC 1.xx on the path, type:

COMTARC [-w] outname file1 [file2 ...]

to create a COMT-file (i.e text-readable) outname.COM (wrapped as
outname.ASC if -w is given) containing file1 [file2 ...] (wildcards ARE
permitted) and self-extracting them upon execution. No extension on
outname may be given. COMTARC.COM is simply created from COMTARC.BAT by
the PC-Magazine BAT2EXEC utility, and is slightly faster.


comt [-1 -3 -w -nname|-x|-h] name[.COM] [outputname]
-x Extract from file
-1 Use 1->2 encoding
-3 Use 3->4 encoding
-w Wrap in a text wrapper
-nname Set name to wrap as
-h This help information

By default the input file is overwritten. If -w is specified, the
output file name.ASC is by default created, unless the outputname
is specified. Default extension on outputname is .COM except in -w
mode where .ASC is used.


Run PKware's PKLITE on .COM files before running COMT to save space (and
allow you to COMT larger files.) COMT appears to be fully compatible
with PKLITE. I have no connection with PKWARE, and PKLITE is the only
one of their product which I specifically recommend.


For some marginal files an error in choice of 1-2 or 3-4 encoding may
result in files about 40 bytes longer than otherwise.

Executables larger than about 45Kb encode to more than 63Kb and so
cannot be run in the encoded format, though COMT -x can be used to
decrypt them.

The -x extract option will fail if the file it is extracting from
contains the magic symbols S&$ig(Ap at the beginning of a line before
the COMT-processed data. This should cause no one problems.

There may be more bugs.

No virus checking software looks under the COMT encoding. As a plus,
you can look at COMT-processed executable and if it is plain text (no
funny control/extended/foreign characters) then it is a very good bet
that no virus hooked to it AFTER the original COMT-processing (since the
virus would be very unlikely to be plain-ASCII readable.)

The author absolves himself of all responsibility. He can be reached at
[email protected] (internet).

 December 25, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>