中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-31 07:23
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » Source code of a soft shutdown program under DOS
Printable Version  6,340 / 25
Floor1 Wengier Posted 2002-11-28 00:00
系统支持 Posts 10,521 Credits 27,736
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
Floor2 herons Posted 2002-11-28 00:00
初级用户 Posts 6 Credits 126
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
Floor3 LiveOnLove Posted 2002-11-29 00:00
中级用户 Posts 161 Credits 493 From ZHCN
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 ]
Floor4 copy114 Posted 2002-11-30 00:00
初级用户 Posts 37 Credits 229
Oh! With these source codes, what software can be used to compile them into EXE?
Floor5 Wengier Posted 2002-11-30 00:00
系统支持 Posts 10,521 Credits 27,736
The simplest way is to use DEBUG to compile into an EXE file, or formally use MASM and other compilers.
Floor6 LiveOnLove Posted 2002-12-01 00:00
中级用户 Posts 161 Credits 493 From ZHCN
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




Floor7 worrk Posted 2002-12-10 00:00
初级用户 Posts 7 Credits 124
Hehe, thanks, I can see very clearly!
Floor8 柳飘逸 Posted 2002-12-14 00:00
初级用户 Posts 11 Credits 119
Can you tell me about the operations with MASM?
Floor9 superdos Posted 2003-04-04 00:00
中级用户 Posts 43 Credits 272
What do these mean?
Floor10 Wengier Posted 2003-04-04 00:00
系统支持 Posts 10,521 Credits 27,736
The front is calling the INT15 interrupt to perform the shutdown operation, and the back is exiting.
Floor11 Lydong Posted 2003-04-07 00:00
元老会员 Posts 407 Credits 1,468 From 广州
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?
Floor12 Lydong Posted 2003-04-08 00:00
元老会员 Posts 407 Credits 1,468 From 广州
Found a software to restart the computer, with functions such as cold boot, warm boot, system boot, etc. The system boot menu can successfully restart DOS.
Open the attachment
Floor13 iwons Posted 2003-04-10 00:00
初级用户 Posts 5 Credits 114
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
Floor14 Wengier Posted 2003-04-10 00:00
系统支持 Posts 10,521 Credits 27,736
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.
Floor15 Lydong Posted 2003-04-10 00:00
元老会员 Posts 407 Credits 1,468 From 广州
It works here, but the stability is not very good either!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023