Only those supporting APM have the shutdown function call of INT 15H.
MOV AX,5300H
XOR BX,BX
INT 15H
JNB NEXT
JMP NOAPM
NEXT:MOV AX,5301H
XOR BX,BX
INT 15H
MOV AX,530EH
XOR BX,BX
MOV CX,101H
INT 15H
MOV AX,530FH
MOV BX,1
MOV CX,BX
INT 15H
MOV AX,5308H
MOV BX,1
MOV CX,BX
INT 15H
MOV AX,5307H
MOV BX,1
MOV CX,3
INT 15H
NOAPM:
;Shutdown not supporting APM
What is rather strange is that usually those supporting APM will use it.
MOV AL,0BH
OUT 0B2H,AL
HLT
For those only supporting ACPI shutdown, you can try the following program. Since it uses specific I/O ports, the compatibility is not very good.
MOV AL,0EH
MOV DX,0CF9H
OUT DX,AL
HLT
As for the timing issue, improve it yourself
[
Last edited by netwinxp on 2008-12-23 at 15:40 ]