Sunday, September 22, 2019 | Toby Opferman
 

Reboot

Toby Opferman
http://www.opferman.net
programming@opferman.net


        How to Reboot The Computer


   There are a number of ways to Reboot the
computer.  One of them is to Call Interrupt 19h

 INT 19h    ; Call BootSector Loader


   Another is to make a Far Jump or Call to

   FFFF:0
This can be done a number of ways:

  db 0eah
  dw 0
  dw 0ffffh

  (Hard code to make sure assembler doesn't optimize)

    Or (Using at least 186 Instruction code)

   PUSH 0FFFFh
   PUSH 0h
   RETF

   When making a Jump to FFFF:0, There is a "Status Word"
that you can set to make the computer to a few differnt things:
   #1 Warm Boot - Don't do a Memory Check & Don't Alter Memory
   #2 Warm Boot - Don't do a Memory Check & Alter Memory
   #3 Cold Boot - Do A Memory Check
   #4 Factory Test - Do a Continous Hardware check forever

   This Status word is at 0040:0072h

   The Words to be written to that location for the above are:
   #1  4321h
   #2  1234h
   #3  0000h
   #4  0064h

  Another way to do it besides a far jump/far call
would be to use the System control port (Some EISA & MCA Systems)
  IN AL, 92h
  OR AL, 1
  OUT 92h, AL
You may want to delay before outting. This just sets bit 0.

  The Final way we will show here is to use the keyboard port.
Port 64h, when you send it a command, it will poll that bit for
6 microseconds.  If you send it the command 0FEh, Bit 0 is
attached to the CPU Reset Line, and that will poll that Line
for 6 microseconds causing the computer to reboot.

  MOV AL, 0FEh
  OUT 64h, AL

(NOTE: Before doing this you may want to poll Port 64h Until you
       get an "OK" that the buffer is not full:

         IN AL, 64h
         TEST AL, 2h
         JZ READY
)
 
About Toby Opferman

Professional software engineer with over 15 years...

Learn more »
Codeproject Articles

Programming related articles...

Articles »
Resume

Resume »
Contact

Email: codeproject(at)opferman(dot)com