Windows and DOS binary executable files with the .EXE
extension have an MZ
header in them and nowadays also a PE
header.
But before these there used to also be .COM
binary executable files and they had no internal header, they were just raw x86 machine code.
But Intel's x86 processor family has been around for ages from the 8-bit era through to the 64-bit era with the instruction set and the memory model changing several times. Memory models had to do with how to access more memory beyond the processor's address bus could directly address. There used to be multiple pages of memory and segment registers
So back to .COM
files, did they use "real mode" or "protected mode"? Or were both used? If both were used, was there any way to tell which was needed?
I want to disassemble some old .COM
executables and the tool asks me whether the files are real mode or protected mode.
(I did assembly and machine code programming on Z80 and Motorola 680x0 and switched to PCs in the 486 (32-bit) era but found the assembly syntax and segmented memory models ugly and didn't continue with assembly language or even understand the stuff about memory segments and such.)