![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
King of Portal
|
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.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
i just did a google search "assembly reboot code"
http://www.faqs.org/faqs/assembly-la...section-5.html hope that helps
__________________
i dont know much about programming but i try to help |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
King of Portal
|
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.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#5 |
|
King of Portal
|
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 mov bx, 0x0001 mov cx, 0x0003 int 0x15
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Attitudes | Oddball | Coder's Corner Lounge | 29 | Mar 18th, 2006 9:34 PM |
| Add - ins for Power Point 2003 | christophersong | Visual Basic | 0 | Dec 19th, 2005 3:32 PM |
| How to post a question | nnxion | C++ | 10 | Jun 3rd, 2005 11:53 AM |
| How to post a question | nnxion | C++ | 0 | Jun 3rd, 2005 8:55 AM |
| How to post a question | nnxion | C | 0 | Jun 3rd, 2005 8:55 AM |