Announcement

Collapse
No announcement yet.

Reboot using PB 3.5

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gary Akins
    Guest replied
    Steve - if you'd rather do a warm-boot instead and bypass all the cold-boot POST tests, then
    Code:
    CALL INTERRUPT &H19
    will also work. Just beware of the caveat mentioned above if you're using a DiskOnChip or some other FlashRAM module which masquerades as a hard drive; the DOC's BIOS extensions will fail to reinitialize on a warm boot. (This is one of those lovely "undocumented features" 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.)

    ------------------

    Leave a comment:


  • Steve Brendlinger
    replied
    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.


    The code Gary posted worked fine for my app. I am running DOS on an embedded system and have no Windows worries...

    ------------------

    Leave a comment:


  • Mel Bishop
    replied
    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.


    ------------------

    Leave a comment:


  • Gary Akins
    Guest replied
    ...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.

    ------------------

    Leave a comment:


  • Mel Bishop
    replied
    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 .......


    ------------------

    Leave a comment:


  • Gary Akins
    Guest replied
    Steve - try this:

    Code:
    DEF SEG = &HFFFF
    Z& = &H0000
    CALL ABSOLUTE Z&	'--jump into the BIOS "Cold Boot"
    This is the restart code I use in all of my embedded-systems programs(*) - which are all plain-DOS based, so as Lance says, this isn't necessarily guaranteed to work from within Windows...

    (* 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".)

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    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>

    Leave a comment:


  • Steve Brendlinger
    started a topic Reboot using PB 3.5

    Reboot using PB 3.5

    How do I cause the PC to reboot from within a Power Basic 3.5 program?
Working...
X