Node:Reboot the PC,
Q: How can I reboot the PC from a DJGPP program?
A: There are several possible ways to achieve this:
__dpmi_intinstruction. (Emitting the literal
INT 19hinstruction won't work with CWSDPMI, because CWSDPMI deliberately blocks it; version r5 of CWSDPMI might remove this restriction.)
INT 19hinstruction is a better alternative, since Windows misbehaves when INT 19h is issued via
FEhcommand to the port 64h:
outportb (0x64, 0xfe);
(this should be preceded by a test whether the keyboard buffer is full; because then the keyboard will ignore the command; however, keyboard-full is a very rare condition).