Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 571
  • Last Modified:

Automatic MSDOS boot

I am searching for a dos utility in order to boot my MSDOS pc.
Could be C routine or simple executable to launch.

thanx
0
eric33
Asked:
eric33
  • 8
  • 7
  • 5
  • +3
1 Solution
 
MichaelMarchCommented:
What do you want msdos to boot to? Or do you want you to boot directly to a msdos prompt?
0
 
mark2150Commented:
From the DOS C> Prompt:

DEBUG RESET.COM
A
XOR AX, AX
NOT AX
PUSH AX
NOT AX
PUSH AX
RETF
(return on a line by itself)
RCX
9
W
Q

At this point you'll be back at the DOS prompt with a little 9 byte file RESET.COM. Place that file in a batch or run it from the command line to reboot any PC. It will not work from a DOS child under windows.

M
0
 
sstvpmCommented:
If U R having windows 95 then U can go to dos by doing the following:
1.  Go to c:
2.  Give command      attrib -r -s -h msdos.sys
3.  Then give              edit msdos.sys
4.  A line with BootGUI=1 will be there. Change it to BootGUI=0.
5.  Save the file & Exit.
6.  Give attrib +s +h +r msdos.sys

If U give win after the pc has booted to Dos, then windows will be loaded.
0
Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

 
sstvpmCommented:
If U R having windows 95 then U can go to dos by doing the following:
1.  Go to c:
2.  Give command      attrib -r -s -h msdos.sys
3.  Then give              edit msdos.sys
4.  A line with BootGUI=1 will be there. Change it to BootGUI=0.
5.  Save the file & Exit.
6.  Give attrib +s +h +r msdos.sys

If U give win after the pc has booted to Dos, then windows will be loaded.
0
 
vikiingCommented:
>>Give attrib +s +h +r msdos.sys

That's totally unnecessary...

0
 
mark2150Commented:
Vikiing, it may be "unnecessary" but it is good practice. I kind of like to protect MSDOS.SYS, IO.SYS, COMMAND.COM, AUTOEXEC.BAT and CONFIG.SYS with ATTRIB +R +H to make the system capable of riding thru a DEL *.* at the C:\ prompt ...

M
0
 
vikiingCommented:
>>I kind of like to protect MSDOS.SYS, IO.SYS, COMMAND.COM, AUTOEXEC.BAT and CONFIG.SYS with ATTRIB +R +H to make the system capable of riding thru a DEL *.*

OK, you can like, but I definitely not. On the other hand, if you work at root directory, then you must organize a bit better your disk and/or your way of working; noone a bit clever would work at root (obviously, under normal circumstances)...
0
 
mark2150Commented:
It's not *me* I'm worried about. But I've run *large* (1200 user) lans and I can tell you that the user community screws with anything they can *see*. I can't tell you the number of times I've seen systems wiped because some moron did a DEL *.* instead of a DEL A:*.* to wipe a floppy. It's a simple precaution and certainly saves more time than it looses. In fact our workstation auditor does the ATTRIB +R +H every month just for grins! You're thinking 'for me', I'm thinking 'for all users'... :-)

M
0
 
eric33Author Commented:
First all the responses about W95 the response is no i dont have windows 95.
It is pure MSDOS.

I try to enter the RESET.COM.
All was ok and the result was a 9 bytes length com file.
But launching reset.com do nothing and hangs the pc.

0
 
eric33Author Commented:
For Michael March
I want to boot the PC not to simply returns to DOS prompt.
0
 
mark2150Commented:
Then use my little 9 byte RESET.COM program. Try building it again. I can email a functional copy if you need. The PC shouldn't hang, it should reboot.

M
0
 
MichaelMarchCommented:
Boot the PC??

Do you mean reboot the computer? Or do you mean to turn it on?  Your question is rather vague, if you ask me.
0
 
vikiingCommented:
>>You're thinking 'for me', I'm thinking 'for all users'... :-)

Of course, that's the right process when you have a "public machine" (everybody use, nobody clean). In that case, yes, the MINIMUM protection is that; I agree with you.


Eric: under DOS, just do this jerk:

COPY  CON  BOOT.COM
51  192  247  208  80  80  203  F6  Enter


Those numbers are sequence of Alt-generated characters, typed in sequence, with no intervening spaces.

Thus, you start typing Alt-51 Alt-192 Alt-247... end with Alt-203, then press F6 and Enter.

That would create the file named BOOT.COM . Just execute it (type directly BOOT at prompt and press Enter) and voilá !!!!
0
 
eric33Author Commented:
For Michael March again i want to have either a simple executable (com,exe) or a sample C code to make a soft reboot of my PC (that means the same think that i have pressing Ctrl+Alt+del).
Hope this is most clear.

For vikiing and march2150 i create the BOOT.COM and the RESET.COM EXACTLY as you described.
When i launch the COM file (reset or reboot) the pc hangs and no reboot is done.

thanks for your help

0
 
eric33Author Commented:
Adjusted points to 500
0
 
eric33Author Commented:
Because of the short time i have to find a solution i increase the points to 500.
0
 
vikiingCommented:
Friend Eric: ¿hace you tried what I've suggested? And don't waste so many points; 200 is already a robbery...
0
 
eric33Author Commented:
To vikiing
Yes i try. I make the REBOOT.COM as suggested and when i launch it the pc hangs and no reboot is done.
The dos version is MS DOS 6.22

About the points i need the solution very quickly so perhaps points can do the stuff...
0
 
mark2150Commented:
Give me your email and I'll send you a copy of reset.com. If *that* doesn't work then there's something else going on.

All 80x86 CPU's start reset execution at FFFF:0000. Until the memory management IC's are initialized this is the top 64kb segment of the PC's 640Kb memory model (F:0000). My little routine pushes FFFF:0000 onto the stack and then does a Far Return (RETF). This should cause the CPU to restart the ROM BIOS at the same entry point that is used when your finger comes off the [RESET] button.

If you're running a straight DOS box, this should reboot you in a heartbeat.

When you're running a DOS child under windows, the DOS child will die but the rest of the machine will continue on. This is because a RETF is a priveleged instruction and the OS can trap a task attempting to execute a priveleged instruction.

M
0
 
drittichCommented:
0
 
vikiingCommented:
Mark: you said "This is because a RETF is a priveleged instruction and the OS can trap a task attempting to execute a priveleged instruction"

Leaving aside the details, remember Eric stated "i dont have windows 95.
It is pure MSDOS."

Your solution should have worked (not mine); I don't know where is the problem.

0
 
mark2150Commented:
Right. My little routine has never failed on a pure DOS box unless there is something else going on.

XOR AX, AX - Make 0000H
NOT AX - Change to FFFFH
PUSH AX - Place on Stack
NOT AX - Change back to 0000H
PUSH AX - Plact on Stack
RETF - Return to address FFFF:0000

As your finger comes off the <Enter> key after running the program the next thing you see should be the BIOS signon and memory test running.

I've successfully used this code under all sorts of boxes, servers, workstations, embedded PC's. It provides a "harder" reset than <Ctrl/Alt/Del> does because the <C/A/D> reset usually enters the BIOS at a different point and skips some of the prelim POST tests.

Something else is fishy on his system.

M

0
 
eric33Author Commented:
Ok i load the file from the shortcut given by drittich. It works !!!

But to be sure i reenter the code given by mark2150.
It works now. I think i make some error when typing it (go figure).

I give the points to mark2150 because i think he is the one who makes the most.

thanks to everybody.
You are quite good in your subject.
0
 
eric33Author Commented:
Seek previous comment.
0
 
mark2150Commented:
Thank you sir!

M
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 8
  • 7
  • 5
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now