3 ms·
COM is a machine code file to be loaded at 0100 then executed. There's no instruction difference, but you have to remove the headers. Even a .a produced by GCC
by freeone3000 7y ago
COM is a machine code file to be loaded at 0100 then executed. There's no instruction difference, but you have to remove the headers. Even a .a produced by GCC has to be de-ELFed with -nostdlib -ffreestanding.
- messe 7y ago-ffreestanding will still produce an elf binary. You have to either use "objcopy -O binary" or set the output format in the linker script (or on the linker command lind) to produce a flat binary without headers.
- ksaj 7y agoWe used to refer to .com files as memory images, because they look the same on disk as they do in memory. EXE, OVL and the like had relocatable segments, whereas the memory images assumed all segments were within the code segment. cs=ds=es and the stack you just crammed somewhere in that space, usually at the end of the literal code, but still very much inside the space of the one segment you could access.