shutdown - ATX

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
nitroglycerin

shutdown - ATX

Post by nitroglycerin »

hello!

How to shutdown computer (ATX) (software shutdown)?
I assume it is done through ports and/or opcodes, but which?

thx
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 - ATX

Post by Pype.Clicker »

i don't know, but i know this depend on the Advanced Power Management or Advanced Power Control Interface. And i also know Moebius can do it. Check out the CVS browser from Tim Ronbinson's webpage :)
Tim

Re:shutdown - ATX

Post by Tim »

...which, in turn, came out of the Menuet sources. int 15h handles it.
nitroglycerin

Re:shutdown - ATX

Post by nitroglycerin »

thanks Tim. I looked into 15h and now my poor OS gloriously shuts down ;)
Tim

Re:shutdown - ATX

Post by Tim »

Great, isn't it? :) Feels like a real OS now.
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 - ATX

Post by Pype.Clicker »

no option like shutting down without going back to real mode ?
Tim

Re:shutdown - ATX

Post by Tim »

What would you do in real mode? Boot some other OS? Maybe, but you'd have to re-init any hardware you'd used first. Why not let the BIOS do that? Hey: switching to real mode and re-initing hardware using the BIOS. That sounds like... rebooting! :)
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 - ATX

Post by Pype.Clicker »

err ?? i must have been unclear or i'm too tired to understand your response ...

what i meant is can't we shutdown the computer while in pmode ? calling bios INT 15h implies we go back to real mode, isn't it ? can't that be avoided ?
Tim

Re:shutdown - ATX

Post by Tim »

OK, n/m my previous response. :)

AFAIR there are several APM interfaces through int 15h: real mode, 16-bit pmode and 32-bit pmode. It seemed easier for me to use the real mode interface, as I already had a V86 monitor in place. It shouldn't be necessary to switch back to real mode unless you want to start another OS (hence my previous response).
Post Reply