Jump to content
Hulsie

EXE vs. COM vs. BIN vs. OBJ vs. XEX

Recommended Posts

These all seem to be bootable directly from DOS, and they all appear to behave the same... So are there any technical differences between these? If I were to rename a COM to an EXE would I be committing a cardinal sin?

Share this post


Link to post
Share on other sites

Generally COM is the only reserved type, but Atari Dos doesn't care much what user filename/ext you use so long as the reserved ones like DUP.SYS, MEM.SAV etc aren't used for general data.

 

Some Doses will assume some types like BAT or COM are batch or executable files and allow you to just type the filename without extension as a shortcut to launch them.

 

Executable/binary file is an interchangable term, they are generally compound files with 1 to N parts where each part can load and optionally have an initialize phase, and a run phase once the file is totally loaded.

 

BIN extensions these days are just raw Rom or cartridge dumps. Doses don't usually deal with Rom files but under emulation there's a lower level of abstraction in that you can customize the emulated hardware with whatever OS Rom, cartridge, Basic etc. you want.

 

OBJ is generally used when developing - e.g. an assembled file which you might load with a debugger and run manuallly, but it's crept into general usage so is essentially same as an executable.

Share this post


Link to post
Share on other sites

OBJ is generally used when developing - e.g. an assembled file which you might load with a debugger and run manuallly, but it's crept into general usage so is essentially same as an executable.

I thought obj files were higher level than binary

Share this post


Link to post
Share on other sites

I thought obj files were higher level than binary

 

When I create a routine which works perfect, I finish it, and I save the source file and the 'assembled' (compiled) version into a .obj file. That is for me a good reminder, that it is not a complete finished program, but a 'part' of it (an object).

 

The only 'important' rule (I guess) is that an .obj file does not contain raw data. .obj files do contain information where the contents of the .obj file needs to be located in memory.

Share this post


Link to post
Share on other sites

XEX is really an Atari EXE file but intentionally named that way to keep MS DOS/Windows from getting confused with PC EXE files when using with Atari emulators on a PC.

Share this post


Link to post
Share on other sites

These all seem to be bootable directly from DOS, and they all appear to behave the same... So are there any technical differences between these? If I were to rename a COM to an EXE would I be committing a cardinal sin?

 

The differences are minor. The actual format/encoding is identical, though the use cases are different. ".EXE" is sort-of the native way to express binary load files. ".COM" is the extension used by Dos OS/A+ and related to identify external commands. You just type in the name without the ".COM" and the file will pick up command line arguments from the command line and execute that. The difference is also that Dos OS/A+ always runs .COM files from the first load address seen, whereas Dos 2.0S and co will only run files if the run-address vector (2E0,2E1) is set. .COM aka OS/A+ does not require these.

 

.OBJ also uses the same encoding, but is a partial program left for linking. It usually does not include a init or run address at all since it is incomplete. Encoding is, however, right again the same.

Share this post


Link to post
Share on other sites

Thanks for your replies to this, guys. Very interesting!

Share this post


Link to post
Share on other sites

In case of SpartaDOS X, EXE extension is usually used for executables that use RAM in the cartridge area. COM is used by SDX external commands, drivers and other software that requires SDX library. The driver COMEXE automatically handles both extensions so that EXE files are executed by X.COM (and have the cartridge disabled).

 

However, this way of naming executables under SDX is only a recommendation, not mandatory (but quite useful IMHO).

  • Like 1

Share this post


Link to post
Share on other sites

.OBJ I used to know as binary files which were BLOADed in Turbo-BASIC or just used in Atari BASIC, while BLOAD loads files the same way DOSses do with any other kind of .EXE/.COM (except the fact that overwriting the BLOAD-command while loading will crash the whole system). When written for Atari-BASIC, .OBJ-files do not have a DOS header and were loaded just with a machine-routine similar to Turbo-BASIC's BGET command or Byte-By-Byte with a FOR-TO-NEXT-loop.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...