|
Wengier
系统支持
             “新DOS时代”站长
积分 27736
发帖 10521
注册 2002-10-9
状态 离线
|
『楼 主』:
DOS下软关机程序的源代码
使用 LLM 解释/回答一下
DOS下的软关机程序有不少,我知道的就有SHUTDOWN、POWEROFF、OFF、PLOP等等。这儿有PLOP的源代码:
http://plop.at/files/SHUTDOWN.ASM
There are quite a few soft shutdown programs under DOS. The ones I know include SHUTDOWN, POWEROFF, OFF, PLOP, etc. Here is the source code of PLOP:
http://plop.at/files/SHUTDOWN.ASM
|

Wengier - 新DOS时代
欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/
E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)
 |
|
2002-11-28 00:00 |
|
|
herons
初级用户
 
积分 126
发帖 6
注册 2002-11-20
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
用这么麻烦吗?
.model tiny
.286
.code
org 100h
mov ax, 5301h ;APM v1.1 or v1.2 BIOS switches to APM v1.0
mov bx,0 ;compatibility mode
int 15h ;
mov ax, 5307h ;TURN OFF SYSTEM
mov bx, 1
mov cx, 3
int 15h
;mov ax,4c00h
;int 21h
end
Is it so troublesome?
.model tiny
.286
.code
org 100h
mov ax, 5301h ;APM v1.1 or v1.2 BIOS switches to APM v1.0
mov bx,0 ;compatibility mode
int 15h ;
mov ax, 5307h ;TURN OFF SYSTEM
mov bx, 1
mov cx, 3
int 15h
;mov ax,4c00h
;int 21h
end
|
|
2002-11-28 00:00 |
|
|
LiveOnLove
中级用户
  
积分 493
发帖 161
注册 2002-10-29 来自 ZHCN
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
在那时只知道WIN可以自动关机啊。后来分析了一个网卡的TEST程序,其中有一个叫APM.COM的程序,就是和二楼的差不多,还可以软关机显示器,可以看到显示器的POWER LED在闪烁。
Last edited by LiveOnLove on 2016-7-14 at 13:02 ]
At that time, I only knew that WIN could automatically shut down. Later, I analyzed a TEST program of a network card, and there was a program called APM.COM, which was similar to the one on the second floor. It could also soft - shut down the monitor, and I could see that the POWER LED of the monitor was flashing.
Last edited by LiveOnLove on 2016-7-14 at 13:02 ]
|
|
2002-11-29 00:00 |
|
|
copy114
初级用户
 
积分 229
发帖 37
注册 2002-11-9
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
哦!有了这些源代码,用什么软件把它编译成EXE啊?
Oh! With these source codes, what software can be used to compile them into EXE?
|
|
2002-11-30 00:00 |
|
|
Wengier
系统支持
             “新DOS时代”站长
积分 27736
发帖 10521
注册 2002-10-9
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
最简单的是用DEBUG编成EXE文件,或者正规的话用MASM等编译。
The simplest way is to use DEBUG to compile into an EXE file, or formally use MASM and other compilers.
|

Wengier - 新DOS时代
欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/
E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)
 |
|
2002-11-30 00:00 |
|
|
LiveOnLove
中级用户
  
积分 493
发帖 161
注册 2002-10-29 来自 ZHCN
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
是用DEBUG编成COM文件吧?
例如:
C:\windows\>debug
-A(''-''是DEBUG的提示符号,A是DEBUG的汇编命令,输入A后回车)
XXXX:0100 mov ax, 5301(XXXX:0100是内存的代码段(随机的)和DEBUG自动给出的偏移,以下略)
mov bx,0
int 15
mov ax, 5307
mov bx, 1
mov cx, 3
int 15
mov ax,4c00
int 21
-rcx
25(CX寄存器表示文件长度,这里输入的比实际大些)
-n POWEROFF.com(给文件取名)
-w(写入文件)
-Q(退出DEBUG)
Ok,运行POWEROFF.com就可以看到效果了
Is it compiled into a COM file using DEBUG?
For example:
C:\windows\>debug
-A('-' is the prompt symbol of DEBUG, A is the assembly command of DEBUG, enter after inputting A)
XXXX:0100 mov ax, 5301(XXXX:0100 is the code segment of memory (random) and the offset automatically given by DEBUG, and the following is omitted)
mov bx,0
int 15
mov ax, 5307
mov bx, 1
mov cx, 3
int 15
mov ax,4c00
int 21
-rcx
25(CX register represents the file length, here input is a bit larger than the actual)
-n POWEROFF.com(name the file)
-w(write the file)
-Q(quit DEBUG)
Ok, run POWEROFF.com to see the effect
|
|
2002-12-1 00:00 |
|
|
worrk
初级用户
 
积分 124
发帖 7
注册 2002-12-9
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
呵,谢谢了,我看的很清楚!
Hehe, thanks, I can see very clearly!
|
|
2002-12-10 00:00 |
|
|
柳飘逸
初级用户
 
积分 119
发帖 11
注册 2002-12-14
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
能不能说一下用MASM的操作
Can you tell me about the operations with MASM?
|

ぁ拒签ぁ!!!!!!!!!!!!! |
|
2002-12-14 00:00 |
|
|
superdos
中级用户
  
积分 272
发帖 43
注册 2003-4-4
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
mov bx,0
int 15
mov ax, 5307
mov bx, 1
mov cx, 3
int 15
mov ax,4c00
int 21
这些是什么意思?
What do these mean?
|
|
2003-4-4 00:00 |
|
|
Wengier
系统支持
             “新DOS时代”站长
积分 27736
发帖 10521
注册 2002-10-9
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
前面是调用INT15中断以执行关机操作,后面是退出。
The front is calling the INT15 interrupt to perform the shutdown operation, and the back is exiting.
|

Wengier - 新DOS时代
欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/
E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)
 |
|
2003-4-4 00:00 |
|
|
lydong
元老会员
        
积分 1468
发帖 407
注册 2002-10-21 来自 广州
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
软关机和重新启动的程序已经有这么多了,可是还没有可以直接重新启动DOS的程序,下面这个程序:
C>DEBUG↓
-A↓
XXXX:0100 XOR AX,AX↓
XXXX:0102 INT 19↓
XXXX:0104 ↓
-N,CQ.COM↓
-RCX↓
:4↓
-W↓
-Q↓
和 Wengier 写的:
MOV AX,0
INT 19
都不能顺利重启DOS.都是刚出现启动画面时就死机了,请问谁有办法呢?
There are already so many programs for soft shutdown and restart, but there is still no program that can directly restart DOS. The following program:
C>DEBUG↓
-A↓
XXXX:0100 XOR AX,AX↓
XXXX:0102 INT 19↓
XXXX:0104 ↓
-N,CQ.COM↓
-RCX↓
:4↓
-W↓
-Q↓
And the one written by Wengier:
MOV AX,0
INT 19
Both cannot restart DOS smoothly. They all crash when the boot screen just appears. Does anyone have a way?
|

欢迎大家观临我的个人主页:
http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/
EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
|
|
2003-4-7 00:00 |
|
|
lydong
元老会员
        
积分 1468
发帖 407
注册 2002-10-21 来自 广州
状态 离线
|
|
2003-4-8 00:00 |
|
|
iwons
初级用户
 
积分 114
发帖 5
注册 2003-4-2
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
97就想在DOS下编写一个程序实现软关机功能......那时请教了很多老师都不知道怎样编写...
现在,呵呵..........终于知道了,却是在5年之后
In 1997, I just wanted to write a program under DOS to implement the soft shutdown function... At that time, I asked many teachers but none knew how to write it... Now, heh heh.......... Finally knew, but it was 5 years later
|
|
2003-4-10 00:00 |
|
|
Wengier
系统支持
             “新DOS时代”站长
积分 27736
发帖 10521
注册 2002-10-9
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
那个RE-BOOT软件我也有,不过系统启动(即重启OS)那个功能在我的两台电脑上都不能用,在第三台旧电脑上虽能用,但却发现并不是很稳定.
I also have the RE-BOOT software, but the function of system startup (that is, rebooting the OS) doesn't work on both of my two computers. On the third old computer, although it can be used, it is found to be not very stable.
|

Wengier - 新DOS时代
欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/
E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)
 |
|
2003-4-10 00:00 |
|
|
lydong
元老会员
        
积分 1468
发帖 407
注册 2002-10-21 来自 广州
状态 离线
|
|
2003-4-10 00:00 |
|