3 ms·
I have a soft spot for the brutal simplicity of the .COM format.
by eterps 3y ago
I have a soft spot for the brutal simplicity of the .COM format.
- 082349872349872 3y agoBoth ELF and Mach-O (and presumably other recent formats) are amenable to a pseudo-COM approach: https://news.ycombinator.com/item?id=38593896 https://news.ycombinator.com/item?id=38593896
- actionfromafar 3y agoAlso see the pure brutality that is the early Microsoft Office DOC file. :) Just dumping the memory IIRC.
- fullspectrumdev 3y agoI vaguely recall reading that on some versions of Office way back when, memory from other programs would sometimes leak into saved document files. (Pauses commenting to go check) yes it’s referenced in Chapter 3 of “Silence on the Wire”, apparently Office on Windows 95/98 would dump memory from “other programs” into word docs, with some anecdotal sightings in later versions.
- actionfromafar 3y agoMaybe a case of reused allocated memory and just writing chunks of memory to disk. Simplistic example: struct blah_block{ int sz; char buf[510]; }
- WalterBright 3y agoWhat's interesting about that is every tool I've seen to generate .com files would set SS=DS=ES=CS to the same value. But, it turns out, this is not necessary. The only thing about COM is that the file size has to be less than 64K. This enables another memory model, where the code seg and data seg are different, enabling substantially larger programs that were still COM programs. This was the Zortech "small" memory model.