China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-03 00:55
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Implement timing shutdown of ATX power supply in DOS environment View 1,424 Replies 7
Original Poster Posted 2003-07-17 00:00 ·  中国 广东 江门 电信
初级用户
Credits 116
Posts 3
Joined 2003-07-17 00:00
22-year member
UID 7035
Gender Male
Status Offline
I am fortunate to have found this website and hope to get help.
I want to find a small program that can realize the timed shutdown of the ATX power supply in the DOS environment.
Please help, teachers.
Floor 2 Posted 2003-07-18 00:00 ·  中国 吉林 长春 联通
初级用户
Credits 224
Posts 38
Joined 2003-07-16 00:00
22-year member
UID 6989
Gender Male
Status Offline
Shutting down under DOS is okay, but for timing the shutdown, I don't know if there is such a software. I haven't seen such a software.
Floor 3 Posted 2003-07-25 00:00 ·  中国 广东 江门 电信
初级用户
Credits 116
Posts 3
Joined 2003-07-17 00:00
22-year member
UID 7035
Gender Male
Status Offline
Since it's not possible to directly achieve the timed shutdown of an ATX power supply, can we change our approach—indirectly achieving the timed shutdown of an ATX power supply. That is, Program A—can do timing to call some other programs; Shutdown program—achieves the shutdown of the ATX power supply. First run "Program A", and let it call "Shutdown program" at a certain moment. I would like to ask, is there such a "timed program caller"?
Floor 4 Posted 2008-11-28 14:46 ·  中国 北京 海淀区 电信
新手上路
Credits 11
Posts 7
Joined 2008-10-08 12:12
17-year member
UID 127763
Gender Male
Status Offline
It seems that comrades raised such a question a long time ago. Is there a solution now?
Floor 5 Posted 2008-11-28 16:00 ·  中国 浙江 嘉兴 桐乡市 电信
新手上路
Credits 17
Posts 8
Joined 2008-07-19 14:30
17-year member
UID 121715
Gender Male
Status Offline
I only know there is an AT command for timing, but it doesn't run under DOS
Floor 6 Posted 2008-11-28 20:08 ·  中国 上海 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
Since you know it's not under DOS, then what's the point of your reply like this?
Floor 7 Posted 2008-12-22 19:05 ·  中国 广东 深圳 福田区 电信
新手上路
Credits 2
Posts 1
Joined 2006-07-28 22:13
19-year member
UID 59452
Status Offline
Sure, first you can judge when to shut down by reading the time. Reading the time can be done by reading the CMOS value. As for shutting down under DOS, you can call the BIOS or some shutdown programs.
Floor 8 Posted 2008-12-23 15:18 ·  中国 福建 厦门 电信
高级用户
★★★
Credits 741
Posts 366
Joined 2007-07-25 19:11
18-year member
UID 94024
Gender Male
Status Offline
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 ]
Forum Jump: