Posted: Fri Jan 12, 2007 12:13 pm
Restart or reboot is very, very simple:
RESTART:
REBOOT:
POWER OFF (using older APM 1.2)
I am not sure that both functions will work under PMode, i use them in my (un)real mode OS and they works perfectly.
But, when you are turning off a PC, who cares in PMode? You can very easily switch to real mode (this is my code, so try it and tell if it works ):
[EDIT: Changed the NOT negator]
This is a very simple example why real mode can be still handy in some situations
Good luck!
inflater
RESTART:
Code: Select all
JMP FAR 0FFF0h:0F000h
Code: Select all
INT 19h
Code: Select all
mov ax,5301h
xor bx,bx
int 15h
mov ax,530Eh
mov cx,0102h
int 15h
mov ax,5307h
mov bl,0001h
mov cx,0003h
int 15h
But, when you are turning off a PC, who cares in PMode? You can very easily switch to real mode (this is my code, so try it and tell if it works ):
Code: Select all
MOV EAX,CR0
AND AL,0FEh
MOV CR0,EAX
This is a very simple example why real mode can be still handy in some situations
Good luck!
inflater