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

As others have mentioned, “Program too big to fit in memory” means that DOS can’t find a large enough memory block to fit the amount of memory that your program’s header requests. This can be either because you have too little available conventional memory (extended memory isn’t taken into account), or because your executable is corrupted. To answer your ...


10

The simplest way to patch a .com file is DEBUG, which comes with any DOS installation. DEBUG is partially usable for .exe files as well, but cannot reverse their relocation process, and so cannot save them once they have been relocated (If you load them as a plain binary file instead of an executable, you can, however, save them, but have limitations with ...


9

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’...


9

a bit off topic to your actual question but to make your game/exe whatever usable again: Too much memory common on MS-DOS for 32MByte and 64MByte (IIRC some versions use 32 some 64). The memory manager reports negative value of free or total memory causing this problem. To repair simply use Smart Drive and fill memory to it until only 32MByte or slightly ...


6

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. ...


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

The state of the art in assembly-level debugging of DOS programs is almost certainly SoftICE. I've never used it, but my understanding is that it was for a very long time the tool of choice of software copyright protection scheme crackers, as well as low-level operating system/device driver developers. That said, it may well be overkill for your problem. ...


3

I have an old game I would like to run, but my DOS machine has too much RAM. The most proper way to run DOS applications in Windows is using DOSbox. "Program too big to fit in memory" It may happen that you have corrupt executable. Obviously I would want to be able to have basic debugging functionality as well, breakpoints, watchpoints, etc. In ...


3

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

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