![]() |
Power Off Question
I'm curious if anyone can refer me to a URL or explain how exactly it is that I can achieve a soft power down in assembly code. Like is there a certain interrupt I should call? Some special value I need to place into memory? A particular opcode? Any help is appreciated.
|
i just did a google search "assembly reboot code"
http://www.faqs.org/faqs/assembly-la...section-5.html hope that helps |
I'm thinking that's not at all what he wants. I would suggest beginning with something like ACPI. Note that not all machines are equipped with this ability. If you're dealing with some relatively common machine, a peep at the BIOS should tell you if APM is available. For something like a desktop PC, you're getting into the driver area, which suggests that you can't just pop some inline assembly into your app.
|
Ya you're on the money DaWei, but thanks for the help mrynit I actually found those tutorials myself and wrote a brief reboot program. I'm not trying to pop some inline assembly into my prog. I was actually hoping to write a small boot loader like the Hello World! example I posted here in the assembly forum, but that once it's done, rather than keeping the computer in a non-terminating loop it waits for a keyboard input and then powers down. Figuring out how to do it within Windows would likely be more complicated then I could understand. Thanks for that link though DaWei someone on the IRC chat had said something referring to ACPI in MenuetOS but I had no clue what they meant.
|
Found what I needed, it was the interrupt 0x15. Of course, proper coding as you pointed out DaWei would require that I perform a check that this interrupt is actually existent and functional. Anyhow, here's the FASM code for a power down.
:
mov ax, 0x5307 |
| All times are GMT -5. The time now is 12:52 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC