flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > how to turn off a PC? |
Author |
|
zhak 11 Aug 2005, 21:13
There are many different ways to reboot a PC, but how to turn off the power?
|
|||
11 Aug 2005, 21:13 |
|
Night Rider 11 Aug 2005, 23:56
|
|||
11 Aug 2005, 23:56 |
|
Night Rider 11 Aug 2005, 23:58
This is method using BIOS, but there are ways of direct hardware ACPI uni-unterface.
|
|||
11 Aug 2005, 23:58 |
|
Night Rider 12 Aug 2005, 00:01
Ways of using
|
|||
12 Aug 2005, 00:01 |
|
THEWizardGenius 12 Aug 2005, 01:38
How do you program ACPI? The APM examples can be derived from the APM spec documentation (which describes all the BIOS calls) but ACPI specs do not describe BIOS calls, hardware support, or anything. Does anyone know how to "tell" ACPI to shutdown? No websites or documents that I've seen do.
Note: I wouldn't use the APM code if I were you. On my computer, for example, the BIOS merely prints gibberish on the screen and crashes. Not all systems support it, or support it properly/well, so it's unsafe to use it. There's a BIOS call for detecting APM, but even that crashes my PC. On older laptops, however, it works virtually every time (including my 486 ) If I remember right, MenuetOS used to have APM code but they removed it due to compatibility issues. It's kinder to print a "It is now safe to turn your computer off" message and halt, ala Windows 95, rather than expect the user to put up with nonsense all over the screen and no more response from the OS! |
|||
12 Aug 2005, 01:38 |
|
smiddy 12 Aug 2005, 04:48
zhak wrote: There are many different ways to reboot a PC, but how to turn off the power? Sorry, but I have to: The On/Off button on the front of the computer, push it! Seriously, there are many ways of turning of the computer, but usually they are not the same for all computers. ACPI is one ay, another are the BIOS calls. Try looking at MenuetOS to see that code. There is a snippet at the end of a routine (the name escapes me now) with several BIOS calls that need to be done in order for it to work; but it doesn' t work on all machines. |
|||
12 Aug 2005, 04:48 |
|
Chewy509 12 Aug 2005, 06:11
THEWizardGenius wrote: How do you program ACPI? ACPI is accessed via an entry listed in the ACPI Tables (see int 15h, e820h). You normally read the ACPI Config table, find the system information table, and from there modify the system state table. To power off the system just set the system power state (S0) to D3 (power-off). see: www.acpi.info -> ACPI v3.0, Section 5. |
|||
12 Aug 2005, 06:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.