Exe2bin
Command-line compilation tool
title: "Exe2bin" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["external-dos-commands", "ibm-pc-compatibles", "microsoft-free-software", "programming-language-implementation"] description: "Command-line compilation tool" topic_path: "general/external-dos-commands" source: "https://en.wikipedia.org/wiki/Exe2bin" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Command-line compilation tool ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | exe2bin |
| developer | Microsoft, IBM, DR, Datalight, Novell, PhysTechSoft & Paragon Technology Systems, The FreeDOS team |
| released | |
| programming language | MS-DOS: x86 assembly language |
| FreeDOS: C | |
| operating system | MS-DOS, PC DOS, DR DOS, ROM-DOS, PTS-DOS, FreeDOS, Windows |
| platform | Cross-platform |
| genre | Command |
| license | MS-DOS: MIT |
| FreeDOS: Sybase Open Watcom Public License | |
| :: |
| name = exe2bin
| logo =
| screenshot =
| screenshot size =
| caption =
| developer = Microsoft, IBM, DR, Datalight, Novell, PhysTechSoft & Paragon Technology Systems, The FreeDOS team
| released =
| latest release version =
| latest release date =
| programming language = MS-DOS: x86 assembly language
FreeDOS: C
| operating system = MS-DOS, PC DOS, DR DOS, ROM-DOS, PTS-DOS, FreeDOS, Windows
| platform = Cross-platform
| genre = Command
| license = MS-DOS: MIT
FreeDOS: Sybase Open Watcom Public License
| website =
The command-line tool exe2bin is a post-compilation utility program available on MS-DOS and other operating systems.
Overview
::figure[src="https://upload.wikimedia.org/wikipedia/commons/f/f9/PC_DOS_1.10_screenshot.png" caption="EXE2BIN.EXE in [[IBM PC DOS]] 1.10"]
::
Early compilers and linkers for the MS-DOS platform could not produce a COM file executable directly. Instead, the compilers would output an EXE-format file with relocation information. If all 8086 segments were set to be identical in such an EXE file (i.e. the "tiny" memory model was used), then exe2bin could convert it to a COM file.
exe2bin could also be used to convert compiled code to make it suitable to be embedded in ROM as part of BIOS or a device driver.
Availability
The command was included in MS-DOS versions 1 thru 3.1 as part of a standard distribution. For version 3.2, among the changes were the version included did not permit itself to run on any version except 3.2.{{cite magazine |magazine=PC Magazine |title=Thank You, IBM |date=January 12, 1988 |author=Asael Dror |page=366}} For the next version, 3.3, there was no EXE2BIN on the DOS disk. "Instead, IBM sells the program separately, at an extra cost, with the DOS Technical Reference." IBM also added code to check the version. PC Magazine published a workaround: just patch it to work with 3.2 or higher.
One way or the other, it was no longer available for the base price after 3.2; for version 6 it was on what was called the Supplemental Disk.{{Cite book |author-last=Wolverton |author-first=Van |title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition |year=2003 |publisher=Microsoft Press |isbn=0-7356-1812-7}} The program was also distributed with many language compilers for MS-DOS in the 1980s, and included with certain versions of IBM PC DOS.
PhysTechSoft & Paragon Technology Systems PTS-DOS, |url=http://download.paragon-software.com/doc/manual_dos_eng.pdf |access-date=2018-05-12 |url-status=live |archive-url=https://web.archive.org/web/20180512094512/http://download.paragon-software.com/doc/manual_dos_eng.pdf |archive-date=2018-05-12}} Digital Research DR DOS 6.0, and Datalight ROM-DOS,{{Cite web |url=https://www.datalight.com/assets/files/ROM-DOS_Users_Guide.pdf |title=Datalight ROM-DOS User's Guide |website=Datalight.com}} also include an implementation of the command.
The command is also available in FreeDOS. This implementation is licensed under the Sybase Open Watcom Public License.
Windows XP and later versions include exe2bin and other 16-bit commands (nonnative) for the MS-DOS subsystem to maintain MS-DOS compatibility. The 16-bit MS-DOS subsystem commands are not available on 64-bit editions of Windows.
References
References
- DEBUG .. E 30D 73 (from a compare/JZ to compare/JNB = greater than OR EQUAL TO 3.2)
- [https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips], 4corn.co.uk
- "ibiblio.org FreeDOS Group -- FreeDOS Base".
- (11 September 2009). "MS-DOS subsystem commands".
- ''The New Peter Norton Programmer's Guide to the IBM PC & PS/2'' by Peter Norton and Richard Wilton (Microsoft Press, 1987) {{ISBN. 1-55615-131-4, p.425
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::