HELLO ,everyone!
a nice day!
Now I wanna to add my os the function of halt (halt -p) and reboot !(but I dont konw how to do ?
I found some usefull information ,and I also need yoiur help
can anyone give me some code in gcc or nasm (gcc will be better) in this filed!
thanks ahead !
halt (-p)and reboot the system in PM
- Pype.Clicker
- Member

- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:halt (-p)and reboot the system in PM
lucky you! here i have grey sky and wet floor.njmarshal wrote: HELLO ,everyone!
a nice day!
there are several methods for rebooting, includingNow I wanna to add my os the function of halt (halt -p) and reboot !(but I dont konw how to do ?
I found some usefull information ,and I also need yoiur help
can anyone give me some code in gcc or nasm (gcc will be better) in this filed!
thanks ahead !
[*]load a 0-sized IDT and issue an interrupt (that'll triple fault and reset)
[*] the 'pulse RESET line from 8042 controller', which should be documented at Bona Fide
In order to shutdown the system, you need to use the APM/ACPI (preferably calling the BIOS). There should be code for that in The Mobius
Using INT15h (according to Tim's code which appears to be Menuet code)
- disconnect interface (ax=5304, bx=0)
- connect real mode interface (ax=5301,bx=0)
- enable power management (ax=5308, cx=bx=1)
- enable device power management(ax=530D, cx=bx=1)
- engage power management (ax=530f,cx=bx=1)
- driver version (ax=530E, bx=0, cx=102)
- set power state(ax=5307, bx=1, cx=3)