Dec 072017
 
Replacement for EXE2BIN w/ C source.
File EXECOM33.ZIP from The Programmer’s Corner in
Category C Source Code
Replacement for EXE2BIN w/ C source.
File Name File Size Zip Size Zip Type
EXE2COM.C86 9334 3091 deflated
EXE2COM.DOC 5965 2151 deflated
EXE2COM.EXE 12527 7427 deflated
EXE2COM.TC 9371 3090 deflated

Download File EXECOM33.ZIP Here

Contents of the EXE2COM.DOC file


EXE2COM 1.02
By Chris Dunford/Cove Software


Purpose
-------
EXE2COM is a one-for-one replacement for the EXE2BIN program
that was formerly distributed with DOS. Beginning with DOS 3.3,
EXE2BIN has been moved to the disk that comes with the DOS
Technical Reference and thus is not available without extra
cost.


Usage
-----
Usage is identical to DOS's EXE2BIN except that the output file
extension defaults to COM rather than BIN (when was the last
time you saw a BIN file?).

Complete usage is:

EXE2COM [d:][path]file[ext] [d:][path][file][ext]

The drive and path of the first file default to the current
drive and path, if not specified. The extension of the first
file defaults to EXE, if not specified.

If the second file is completely unspecified, it defaults to the
same drive, path, and filename as the first, except that the
extension will be COM.

If the second file is specified but without an extension, COM
will be assumed (this is different from EXE2BIN).

The simplest (and usual) usage is simply:

EXE2COM file

which will take the named EXE file in the current directory and
convert it to a COM file in the same directory.


Operation
---------
EXE2COM runs the same way as EXE2BIN, with the following
exceptions:

1. The binary fixup option of EXE2BIN (IP=0, segment fixups
required) is not supported.

2. The EXE file checksum is not verified.

3. Error messages are more useful, and a warning is provided
if a COM file is created with an initial IP other than 100H.


Error Messages
--------------
These are EXE2COM's error messages. If one of these is seen,
the EXE file will not be converted and the errorlevel returned
by EXE2COM will be 1.

ERROR READING EXE HEADER
EXE2COM was unable to read the EXE file header from disk.

ERROR WRITING OUTPUT FILE
EXE2COM was unable to write the converted file to disk.

INVALID EXE FILE SIGNATURE
The first two bytes of an EXE file should be ASCII 'M' and
'Z'. This was not the case, and it's probably not an EXE
file.

EXE HAS RELOCATABLE ITEMS
In order to be converted to a COM file, an EXE file cannot
have any direct references to segments. For example, the
assembler instruction "mov ax,code" (where CODE is a segment
name) is a segment reference. One or more segment
references were found in the EXE file.

EXE HAS STACK SEGMENT
In order to be converted to a COM file, an EXE file cannot
have a stack segment.

EXE HAS NONZERO CS
In order to be converted to a COM file, an EXE file must
have a code segment that begins at offset 0 of the code
image in the EXE file.

IP NOT 0 OR 100H
In order to be converted to a binary file, an EXE file must
have an entry point of 0 or 100H within the code segment.
For COM files, the entry point should be 100H. For SYS
files (device drivers), the entry point should be 0.

PROGRAM EXCEEDS 64K
In order to be converted to a binary file, the total size of
the code to be loaded (including the PSP) must not exceed
64K bytes.

UNKNOWN ERROR
Internal error. Notify the author.


Warning message
---------------
EXE2COM has one warning message:

COM FILE, INITIAL IP NOT 100H

The entry point of all COM files should be 100H. If you are
creating a COM file an the entry point is not 100H, EXE2COM will
do the job but let you know that there is a potential problem.


Source
------
Source code should be included with this archive. Users are
encouraged to modify, improve, and/or correct the source for
EXE2COM and submit the new program to the author for
distribution. Please identify clearly any changes made.

Source for EXE2COM is currently available for the Computer
Innovations C86 compiler (EXE2COM.C86) and for Borland's Turbo C
(EXE2COM.TC). The C86 version in particular should be easily
portable to other compilers.

For compilation, the desired source should of course be renamed
to EXE2COM.C.

The executable in this archive (EXE2COM.EXE) is from the C86
source. The executable derived from the Turbo C source is
available from Borland International's forum on CompuServe.


Public domain
-------------

EXE2COM is hereby donated by the author to the public domain.


History
-------
Version 1.00 04/17/87: Original version by

Christopher J. Dunford
The Cove Software Group
PO Box 1072
Columbia, MD 21044
(301) 992-9371
CompuServe 76703,2002

Version 1.01: port to Turbo C by

Roger Schlafly
Borland International
Scotts Valley, CA 95066
CompuServe 76067,511

Version 1.02 11/22/87: bug fix for even 512-byte file made to
Turbo C port by

Chris Blum ( Consultant )
509 West Main, Front
Ashland, Ohio 44805
CompuServe 76625,1041

Chris Dunford duplicated the fix in the C86 source.


 December 7, 2017  Add comments

Leave a Reply