5 ms·
>a .com created this way would instantly reboot the computer. Even more weirdly, this only worked for the specific command that happened to enter in my first at
by vram22 9y ago
>a .com created this way would instantly reboot the computer. Even more weirdly, this only worked for the specific command that happened to enter in my first attempt
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.
- webtechgal 9y agoThis!! And as I recall, if we replace -W with -G (for 'go') and hit Enter, it would immediately reboot. Then, there also used to be a flag (boolean) that could be used to effect either a warm or a cold boot. Nostalgic. :-)
- vram22 9y agoI had forgotten about -G, and knew about warm and cold boot, but did not know about the flag. Cool, and nostalgic indeed :-)
- rep_movsd 9y agoOr you could just use INT 19 ; (CD 19) On my Windows 9x box it was the fastest way to soft reboot when made to be an MSDOS mode shortcut
- vram22 9y agoDidn't know, thanks. And nice appropriate HN handle :)
- int_19h 9y agoI'll one-up that.
- webtechgal 9y agoIn the context of the current thread, your handle is cool too!! As I recall, the code for up to INT 19H (or 20?) was stored in the ROM BIOS and for INT 21H and up, in the hidden system files (io.sys/msdos.sys) which would get loaded just before command.com at boot.
- int_19h 9y agoIf I remember correctly, the lowest DOS interrupt was 20h. But I don't know if all interrupts below that were actually used. The highest that I remember is 1Ch for the timer interrupt (for which the stock BIOS interrupt handler just returns immediately, but which was commonly overriden by TSRs to simulate multitasking).
- vram22 9y agoAlso there were two groups of interrupts, IIRC: DOS interrupts and BIOS interrupts. BIOS ones were lower level and I guess some of the DOS interrupts used some BIOS ones. I remember a friend using BIOS interrupts to write a program to format a floppy disk and we sat there watching the drive make sounds as it did it.
- webtechgal 9y ago> using BIOS interrupts to write a program to format a floppy disk and we sat there watching the drive make sounds... There used to be a virus/trojan that would execute the floppy drive head re-calibration interrupt (BIOS) in an infinite loop to cause the head alignment to go out of whack, rendering the drive defunct.
- vram22 9y ago