I have an old PC that has no power switch (it's a long story). It is running DOS 6.20. I am looking for an interrupt call or anything to turn off the computer using software as I need it to turn off after unattended operations. I am a little familiar with ASM and interrupts and I'm not afraid to experiment.
1 Answer
I am looking for an interrupt call or anything to turn off the computer
If you have ATX compatible hardware then you can use ATXOFF.COM
ATXOFF.COM 1.3 english
This simply turns off power on ATX Systems (no cache-flushing!), but it requires APM 1.2 to work.
Source dostools
The ATXOFF.COM I have is only 40 bytes. Hardly worth griping over, or continuing this childish gloating.
Simply put. If the OP really wants a batch only solution, just download a copy of ATXOFF, and create a DEBUG (native to 6.22) script from it. Like this...
=== ATXOFF.SCR === A MOV AX,5301 XOR BX,BX INT 15 MOV AX,530E XOR BX,BX MOV CX,0102 INT 15 MOV AX,5307 XOR BX,BX INC BX MOV CX,0003 INT 15 RET G ATXOFF.COM Version 1.3 === End of ATXOFF.SCR ===
Then all that needs done is to input the script into DEBUG in the batch.
debug < atxoff.scr > nul
As mentioned elsewhere, this requires atx hardware, and when run, the power goes off immediately, so be sure to flush your drive cache first.
-
How would one do the 'cache flushing' step then? I imagine it would involve smartdrv? Commented Jun 29, 2016 at 4:28
-
(Also, can someone tell me if
XOR BX,BX; INC BX
is equivalent toMOV BX,0001
?) Commented Jun 29, 2016 at 4:36
shutdown
command?