Rebooting the PC
Code to reboot the PC within QB

Every PC has a BIOS routine to reboot the machine, located at a fixed address, and can be called by using this code:


DEF SEG = &HFFFF
CALL Absolute(0)

That little snippet of code produce a ColdBoot. If a WarmBoot is needed instead, you must poke the value &H1234 in low memory as a flag to the BIOS routine:


DEF SEG = 0
POKE &H473, &H12
POKE &H472, &H34
DEF SEG = &HFFFF
CALL Absolute(0)




Note: Mr. Glenn Stumpff got some observations to the code above:

According to a reference I'm reading, your first example is for a warm boot which may alter memory, but the cold boot should have zeroes POKEd to both addresses. For a warm boot without altering memory, it should be

POKE &H472, &H21
POKE &H473, &H43


RebootPc - page last edited 2003-04-01 22:46:55 by 200.171.100.184 (home) (edit)
Blast WIKI - by RoboticBoy - edited and tweaked for our evil purposes by Hexadecimal Disaster