Wish 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.
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
edit: [2] Section 6 of the paper talks about that, just noticed.
The characters you were typing are (probably) the code for a jump to an entry point somewhere else in the file.