shutdown

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
xyjamepa

shutdown

Post by xyjamepa »

i want to know how can i make command "shutdown"
without IRQ 0x19
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:shutdown

Post by Pype.Clicker »

you know we have a FAQ, don't you ...
i suggest you check:

http://www.osdev.org/osfaq2/index.php/PowerManagement
http://www.osdev.org/osfaq2/index.php/TimRobinson

APM and ACPI typically offer "shut down" code through BIOS interrupt #15. If that still don't suits you, i suggest you delve into ACPI and APM specifications and see if there's another method, but do not expect to find something like

Code: Select all

POWER_MANAGEMENT equ 0xcafe
SHUTDOWN equ 0xbabe

mov ax, SHUTDOWN
mov dx, POWER_MANAGEMENT
out dx, ax
because this does not exists -- not something that would work on all systems, at least so you're better to switch back to real mode and issue the INT 15 call...
earlz

Re:shutdown

Post by earlz »

well see theres a problem with that too, int 15h only does a soft reboot not a turn off
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:shutdown

Post by Candy »

Jordan3 wrote: well see theres a problem with that too, int 15h only does a soft reboot not a turn off
There's a byte in non-volatile cmos ram (in the rtc iirc) that indicates to the int15/19 handler (after reboot) what to do. Strictly speaking you're right, but you can instruct it to turn off for you.
xyjamepa

Re:shutdown

Post by xyjamepa »

i need somthing clear and simple beacuse i didn't understand anything so i need some comments please....
i 'll be so gratefull
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:shutdown

Post by Pype.Clicker »

again:
Shutting down is the matter of ACPI. Check out ACPI BIOS services: it's all in there. It can be hardly clearer than tim's code once you know how those BIOS call works.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:shutdown

Post by distantvoices »

Yeah, Tim's code is good.

@abuashraf: you may read the source snippets we point you to more than once. If you don't understand something, you are invited to make clear WHAT you don't get, ok? English isn't you native tongue, is it? Ok, mine it isn't either. ;-)

Just to make it clear: we canna read thoughts. So point out what's so difficult for you.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply