[an error occurred while processing this directive]
Node:Reboot the PC,
Next:usleep,
Previous:void main,
Up:Miscellany
Q: How can I reboot the PC from a DJGPP program?
A: There are several possible ways to achieve this:
__dpmi_int
instruction. (Emitting the literal INT 19h
instruction won't work with CWSDPMI, because CWSDPMI deliberately blocks
it; version r5 of CWSDPMI might remove this restriction.)
INT 19h
instruction is a better
alternative, since Windows misbehaves when INT 19h is issued via
__dpmi_int
.
FEh
command 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).