39

Plain DOS executables, in either COM or MZ format, don’t provide this information in their headers (when there is one — COM format doesn’t have a header). The only reliable way to determine whether a program requires a given CPU is to try running it on some less capable system (or emulation, e.g. with PCem which has accurate emulations of different x86 ...


30

Most large files (over 64KiB) with a .COM extension are really MZ executables; the DOS loader doesn’t care whether the extension is .EXE or .COM, it uses the MZ signature to identify the format. This is the only documented way for a .COM file larger than 64KiB to work, so it’s the only approach which can be relied upon. However it is possible to build a ....


18

DOS programs always start in real mode (or an emulation thereof), so it’s best to start disassembling them assuming that. When disassembling, you should assume real mode, with 16-bit data and 16-bit addresses, until the code you’re disassembling changes that. The DOS-based disassemblers I’ve used generally know about the executable formats involved, and don’...


16

There is no easy way. The original DOS "MZ" type executable header do not contain such information about what kind of code it contains or what CPU type it needs. It just contains a binary image that is loaded to memory and information about how to start it in real mode, so there are no separate 16-bit or 32-bit binaries. The binary image may ...


13

If you change the lengths of strings in a binary, or indeed move any part of a binary around in any way, then you’re likely to break it: offsets to the data (and code) that the program expects to find are stored in the binary, and won’t be adjusted when you alter it. Thus changing text (or anything else, including code) while preserving the lengths is ...


9

Given that those files are not regular executables, why were they given the COM extension in the first place? They are executable files. They are loadable binary images. In so far they are exactly like COM files, except, when loaded, they are not loaded at offset 0100h, after a prepared PSP, and started with CS:IP as segment:0100h, but segment:0000h. ...


8

Is there some simple method for determining if a DOS binary (.exe or .dll) is 16-bit or 32-bit? For one, DOS doesn't know about 32 bit, it's a strict 16 bit system. Second, .DLL are not DOS executables but Windows libraries. The Linux file command just says "executable". Because all EXE start out as 16 bit programs, marked by the magic number &...


7

Adding or removing some text has the effect that things coming later in the EXE file are now found at a different absolute location, machine code as well as the EXE file format rely a lot on absolute locations. So, it's important to keep the exact same byte length of the file. So, replacing characters is mostly safe (if you're sure that the bytes are really ...


6

The original Spectrum +3 manual has a comprehensive description of the disk format: http://www.worldofspectrum.org/ZXSpectrum128+3Manual/chapter8pt27.html For TR-DOS, it's worth knowing that the .TRD file format is a simple sector-by-sector dump of the disk contents with no additional headers, so any description of the .TRD format (such as this one on zx-...


5

com files are not segmented (its just single segment). They have limitation that it can not cross 64K of code (filesize). They always starts in real mode but I do not think there is any restriction to switch to protected from the code. So while disassembling set real mode any switching from the code should be recognized by the tool. However that is ...


1

Since the coco cassette interface used 1200 baud psk audio encoding in it, the tape format of the coco was 4X faster loading files from the tape and the tape files were 1/4th the size of similar files on atari and commodore systems, which used 300 baud afsk encoding. it became common to stack multiple files on a single tape. many magazines sold software ...


1

TR-DOS Files themselves have no header at all. Metadata is stored in the directory section of the disk, along with the filename. The metadata has a type field, which is also the file extension. Depending on this field you interpret some of the other fields in different ways. "B" for Basic programs. "C" for machine code, or any binary file ...


Only top voted, non community-wiki answers of a minimum length are eligible