How do I cause the PC to reboot from within a Power Basic 3.5 program?
Announcement
Collapse
No announcement yet.
Reboot using PB 3.5
Collapse
X
-
There is some reboot code in the EXAMPLE or FAQ folders supplied with PB3.5.
Note that some Windows platforms (ie, Windows NT/2000/etc) may not actually permit a system reboot to occur, but it should work fine for plain vanilla DOS systems.
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>Lance
mailto:[email protected]
-
Steve - try this:
Code:DEF SEG = &HFFFF Z& = &H0000 CALL ABSOLUTE Z& '--jump into the BIOS "Cold Boot"
(* A cold-start is necessary on most embedded-systems boards if you're using a Flashdisk module such as the M-Systems' Disk-On-Chip, I've discovered, because the DOC's BIOS extensions don't get reinitialized on a warm-boot and the flashdisk suddenly "disappears".)
------------------
Comment
-
It should be noted that if you can reboot within windows, you
will probably get the scandisk routine the next time you boot.
Windows uses something in the partition or boot sector (I don't
remember which) to tell itself if an orderly shutdown has been
performed or not. If it hasn't, then it will do the scandisk
thing. If you can reboot within windows, the orderly shutdown
flag will not have been set and .......
------------------
There are no atheists in a fox hole or the morning of a math test.
If my flag offends you, I'll help you pack.
Comment
-
...which is not necessarily a bad thing since, if your DOS program is able to reboot the system from within Windows, an orderly shutdown won't have been performed.
The only way I can think of to get around that, is if you can figure out how to call the Windows "shutdown" service from within the DOS box.
------------------
Comment
-
You are right Gary. It's not necessarily a bad thing. Windows
will go ahead and boot normally after the scandisk. I only
mentioned this to keep shivers from being generated in ones
spine should this occur.
------------------
There are no atheists in a fox hole or the morning of a math test.
If my flag offends you, I'll help you pack.
Comment
-
Originally posted by Mel Bishop:
You are right Gary. It's not necessarily a bad thing. Windows
will go ahead and boot normally after the scandisk. I only
mentioned this to keep shivers from being generated in ones
spine should this occur.
------------------
Comment
-
Steve - if you'd rather do a warm-boot instead and bypass all the cold-boot POST tests, then
Code:CALL INTERRUPT &H19
M-Systems fails to mention in their datasheets. Drove me nuts for about two days trying to figure out why my C: drive kept disappearing... at first, I thought it was a defective module, but it turns out they all do it.)
------------------
Comment
Comment