5 ms·
Back in the BBS/FidoNet days someone sent me a comic GIF that, when renamed with a .COM extension, would execute under DOS. It was a nifty little demo, although
by softbuilder 9y ago
Back in the BBS/FidoNet days someone sent me a comic GIF that, when renamed with a .COM extension, would execute under DOS. It was a nifty little demo, although .COM files were going the way of the dinosaur around then.
- NuSkooler 9y agoWish I could remember the trick, but in the DOS days I used to type in a few characters (5ish IIRC) at the start of text files that allowed them to be renamed and executed as COM files.
- prewett 9y agoIf you read the paper I think you'll find it is something like "ZM~~_#____PRinty__C", where _ is a space, (HTML compresses spaces). See section 8, also the beginning of the paper.
- softbuilder 9y agoNo, COM files had no header. [2] I think that's part of why they were replaced. ZM was for EXEs. I think that one was someone's initials. (Yes, looked it up. [1]) I think what parent is remembering were characters that effectively created a jump instruction at the beginning of the file. [1] https://en.wikipedia.org/wiki/DOS_MZ_executable https://en.wikipedia.org/wiki/DOS_MZ_executable edit: [2] Section 6 of the paper talks about that, just noticed.
- pjmlp 9y agoThey were replaced because they could not handle more than 64KB.
- TickleSteve 9y ago.COM files were straight binary, no header and loaded at address 256 (0x100) into any 64KB segment. All indirections were local to that segment, hence the 64KB limit of .com files. The characters you were typing are (probably) the code for a jump to an entry point somewhere else in the file.