home *** CD-ROM | disk | FTP | other *** search
- Docs for BIN.com - replacement for exe2bin conversion utility
- R. Trevithick, 12/17/87
-
-
- This is a general purpose replacement for the EXE2BIN utility which
- is no longer supplied free with DOS as it used to be.
-
-
- ****************************************************************************
- * It is based on the EXE2COM 1.00 program which was placed into the public *
- * domain by CHRIS DUNFORD of COVE SOFTWARE. Thanks, Chris! *
- ****************************************************************************
-
- The only (trivial) changes I've made are as follows:
-
-
- - It's less than half the size, and a tad faster.
-
- - It now allocates it's own 30k read-write buffer, and uses file handles
- as opposed to streams.
-
- - The output file is not opened until _after_ the EXE header information
- has been evaluated and BIN determines that conversion is possible. An
- existing file which matches the output filespec won't be needlessly
- trashed now.
-
- - The program implements an abort if there is a non-zero code segment
- value in the EXE header. This was defined but _not_ implemented in
- the original program (I'll probably learn why the hard way; Chris
- knows a lot more about this stuff than I do.)
-
- - The program was made into a .com file for easy patching with Debug.
-
- - The filenames are now handled exactly (I think) like they were in
- exe2bin, so existing batch and make files shouldn't need to be
- modified (just rename bin.com to exe2bin.com.) The default output
- extension is '.bin', which dBase programmers will like, and semicolons
- are trimmed off the names if entered.
-
- Note that you can easily change the default output file extension
- by using Debug to patch the 3 bytes starting at offset 0c3dh.
-
- You should probably display this area before patching, in case
- someone has given you a newer version of this program together
- with the older docs. It should look like this, except that the 3C2C
- part of the address (far left) will probably be different and does not
- matter.
-
- =============================================================================
- C>debug bin.com
- -d0c3d
- 3C2C:0C30 62 69 6E bin
- 3C2C:0C40 00 00 00 2E 65 78 65 00-4D 5A 00 2E 63 6F 6D 00 ....exe.MZ..com.
- 3C2C:0C50 2D 57 61 72 6E 69 6E 67-3A 20 43 4F 4D 20 66 69 -Warning: COM fi
- 3C2C:0C60 6C 65 20 49 50 20 6E 6F-74 20 30 31 30 30 68 0D le IP not 0100h.
- 3C2C:0C70 0A 00 65 78 65 32 62 69-6E 20 63 6F 6E 76 65 72 ..exe2bin conver
- 3C2C:0C80 73 69 6F 6E 20 2D 20 42-49 4E 20 73 72 63 66 69 sion - BIN srcfi
- 3C2C:0C90 6C 65 5B 2E 65 78 74 5D-20 5B 64 73 74 66 69 6C le[.ext] [dstfil
- 3C2C:0CA0 65 2E 65 78 74 5D 00 2D-6F 75 74 20 6F 66 20 6D e.ext].-out of m
- 3C2C:0CB0 65 6D 6F 72 79 00 6F 70-65 6E 65 64 00 emory.opened.
- =============================================================================
-
- The following Debug commands will change the default output file
- extension from '.bin' to '.com', which is the only thing you're
- likely to want to change it to:
-
- debug bin.com <enter>
- e0c3d <enter>
- 63 <spacebar> 6f <spacebar> 6d <enter>
- w <enter>
- q <enter>
-
- You must use the LOWER CASE values for any characters you wish to
- insert here. E.g., the 'o' in "com" was inserted above as a 6fh
- character rather than as a 4fh. Note also that you must use HEX
- values, not decimal! Needless to say, if you have a C compiler
- it will be easier to just change the source code and re-compile.
-
-
- This program remains, of course, in the public domain. NOTE that
- although the program is based on Mr. Dunford's work, it has been revised
- considerably. Any bugs or problems should NOT, therefore, be blamed on
- him. His program (available on most bulletin boards) works as
- advertised.
-
- I'm not releasing the source code until Mr. Dunford has a chance to
- review it.
-
-
- Bob Trevithick GEnie address: R.TREVITHICK
- Information Services Department
- Newark DDSO
- 703 E. Maple Ave
- Newark, NY 14513
-
- Days: (315) 331-1700 Ext. 2658
- Eves: (315) 331-5266
-
-