Page 1 of 1

Shutdown the System

Posted: Sun Apr 13, 2003 11:00 pm
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

RE:Shutdown the System

Posted: Mon Apr 14, 2003 11:00 pm
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

RE:Shutdown the System

Posted: Wed Apr 16, 2003 11:00 pm
by ka3r
Newer Windows systems (Win98 and later) uses APM to automatically shutdown the PC, but the BIOS must support it

RE:Shutdown the System

Posted: Thu Apr 17, 2003 11:00 pm
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.

RE:Shutdown the System

Posted: Fri Apr 18, 2003 11:00 pm
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!