Interesting that you did that by chance, since the probability was somewhat low. but possible, of course.
I used to assemble a tiny .COM program on new computers sometimes, using just DEBUG.COM (the built-in rudimentary debugger that came with DOS), using something like the following (the dash is the DEBUG prompt):
DEBUG reboot.com
-A
JMP F000:FFF0
-.
-W
-Q
Meaning of the above: A to enter Assembly mode - to enter assembly language instructions, the JMP jumps to that address (Intel x86 segment:offset format), which was the location of the instruction in ROM that would reboot the PC, the dot to signal end of assembly input, W to write the code to reboot.com, Q to quit DEBUG.
Then if you typed "reboot", it would.