Shutdown the System

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Wacky

Shutdown the System

Post by Wacky »

OK, with:

  db 0Eah
  dw 0000h
  dw 0FFFFh

i can reset the system, but how can i shutdown my OS ??

thx 4 helping
WaCkY
carbonBased

RE:Shutdown the System

Post by carbonBased »

Just stop running it :)

Seriously, that's all you have to do.  Flush any disk buffers you might have, and shutdown all services/processes that are running, and you're done.  There is no "shutdown" proceedure.

If, however, you mean how do you actually tell the computer to turn off it's power, then you're getting into ACPI or APM (forget which one supports such an action... or maybe they both do?).  In any event, search for either of those on the internet should give you some information (or you can check out the Linux kernel sources for a working implementation).

This step isn't required, of course.  You can just prompt the user with a message saying it's okay to turn off the computer now (such as what windows will do if neither of these two APIs exist on the host computer).

Jeff
ka3r

RE:Shutdown the System

Post by ka3r »

Newer Windows systems (Win98 and later) uses APM to automatically shutdown the PC, but the BIOS must support it
Tim Robinson

RE:Shutdown the System

Post by Tim Robinson »

Even newer systems (Windows 2000 and later) use ACPI to do the same thing.

For your own OS, though, using APM is much easier.
prasikumbhare

RE:Shutdown the System

Post by prasikumbhare »

well, GRUB bootloader provides 'shutdown'.
I hope u r familiar with GRUB.
Check out the GRUB bootloader's source code. It's free!
Post Reply