3 ms·
You could easily create a tiny .COM program to reboot the PC, using DEBUG. You had to start DEBUG, then, at its prompt, use, in sequence, the A (Assemble) comm
by fuzztester 3y ago
You could easily create a tiny .COM program to reboot the PC, using DEBUG.
You had to start DEBUG, then, at its prompt, use, in sequence, the A (Assemble) command to assemble a JMP instruction, the N (Name) command to name the .COM file to write the assembled machine code to, the R (Register) command to set the CX register, indicating the number of assembled machine code bytes to write to the file (with the BX register already initialised to 0 by DEBUG on startup, because both BX and CX were used to indicate the number of bytes to write) and then the W (Write) command to write that many bytes of machine code to that file.
Then you would exit DEBUG.
Now, at any time after that, you could run that .COM file to reboot your PC.
So if it was called R.COM, you could just type R and hit Enter to reboot. (In DOS, you did not have to type the executable file name's extension, whether it was .COM or .EXE or .BAT.)
So if you were playing a game in the office during working hours, it could be faster to type R and hit Enter, than even to press Ctrl-Alt-Del or to press the reboot button of your PC. Useful if your boss suddenly came into the room ...
IIRC the JMP instruction was: JMP F000:FFF0. (1)
That would make the PC jump to that address in memory (in the BIOS ROM) and start executing the code there.
And that was the start of the BIOS machine code to reboot the PC.
(1) When I googled just now to confirm the address, since I was not sure of the exact one, interestingly, the first hit was an article about the same topic on ... Susam's site :)
But his BIOS address as shown is different from mine.
See the section "Reboot Program" at:
https://susam.net/rebooting-with-jmp-instruction.html https://susam.net/rebooting-with-jmp-instruction.html
- fuzztester 3y agoMy second paragraph above only outlines how to do it. It assumes that you know the syntax of the DEBUG commands. Susam's article linked above shows the exact procedure, with precise syntax.
- fuzztester 3y ago>So if you were playing a game in the office during working hours, it could be faster to type R and hit Enter, Of course, you would have to exit the game first, but many DOS games could be exited fast, by just pressing Esc rapidly one or more times, or Alt-X, or other similar methods.
- fuzztester 3y agoThe .COM program was only 5 bytes long, so it loaded instantly too.