🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.misc
Article #2745

Re: 2 part problem

#2745
From: Stephen Guerke
Date: Sat, 11 May 1991 15:15
91 lines
3456 bytes
In article <1991May10.202806.18512@ux1.cts.eiu.edu> bucacs@ux1.cts.eiu.edu (Carlos Dragonslayer Butler) writes:
>
>	I have a slight problem. I need to write a routine (preferably in    
>Pascal) that will reboot a machine. The second part to this problem is
>that on reboot, I need to select my config.sys file. The computer in
>question needs to have one configuration for PLATO use, and another for
>Novell use. Cant it be done? How???
>-- 
> Carlos Dragonslayer Butler|       "People often condescend          
>   bucacs@ux1.ctseiu.edu   |     what they fail to comprehend.       
>       Lord of House       |      Ignorance makes life easier.       
>                           |  Peace, knowledge, love and happiness." 

You can do a reboot with the following:

Using a simple ASCII text editor (VDE or QEDIT) write the following
debug script.

NOTE: line numbers are for reference DO NOT TYPE THE LINE NUMBERS (or
the following colons) IN YOUR FILE!!

1:  a 100
2:  mov ax,40
3:  mov ds,ax
4:  mov ax,1234
5:  mov [0072],ax
6:  jmp f000:e05b
7:
8:  r cx
9:  10
10: n reset.com
11: w
12: q

NOTE: Be sure that line 7: is blank.

Proof read the script very carefully.  Save it as RESET.SCR.  Now
comes the fun part.  Be sure that DEBUG (its usually found in your
/DOS subdirectory) is in your PATH.  Then at the prompt type:

c:\> debug < reset.scr

if everything works properly (and it should if you typed the script
properly :-)) you will find a little program named RESET.COM in your
directory.

RESET.COM is a little program that will perform a warm boot on your
machine and can be used in a batch file.

I use it to quickly and easily reconfigure my machine (286 w/ 2.5Mb
RAM) from running in a DOS environment with a 1.5Mb cache in extended
memory and .5Mb expanded memory left open for Quattro Pro and
WordPerfect, etc. to an evironment for running WINDOWS 3.0 (yeah, I
actually run WINDOWS on a 286...no flames please! :-))

I have created a subdirectory on my harddrive called /SYS in which I
have put config and autoexec files designed for each environment (and
a few other batch files that need to be changed for each environment)
and given them an extention that identifies them. ex. CONFIG.DOS,
CONFIG.WIN, AUTOEXEC.DOS, AUTOEXEC.WIN etc.

In my root directory I have put the following two batch files:

STARTDOS.BAT
@ECHO OFF
REM FOR STARTING DOS ENVIRONMENT
COPY C:\SYS\CONFIG.DOS C:\CONFIG.SYS
COPY C:\SYS\AUTOEXEC.DOS C:\AUTOEXEC.BAT
C:\BIN\RESET.COM 
REM    ^^^^^^^^^ THE FILE YOU JUST CREATED

and

STARTWIN.BAT
@ECHO OFF
REM FOR STARTING WINDOWS
COPY C:\SYS\CONFIG.WIN C:\CONFIG.SYS
COPY C:\SYS\AUTOEXEC.WIN C:\AUTOEXEC.BAT
C:\BIN\RESET.COM

I hope this helps
Steve

 


-- 
          --------------------------------------------------------
   Stephen Guerke, Coord. Computer Resources  sguerke@brahms.udel.edu
   University of Delaware Parallel Program    stephen.guerke@mvs.udel.edu
   Georgetown, DE 19947                       ILV20078@UDELVM.UDEL.EDU
Technical Details
Message-ID: <21293@brahms.udel.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!brahms.udel.edu!sguerke
References: <1991May10.202806.18512@ux1.cts.eiu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!brahms.udel.edu!sguerke
From: sguerke@brahms.udel.edu (Stephen Guerke)
Newsgroups: comp.os.msdos.misc
Subject: Re: 2 part problem
Message-ID: <21293@brahms.udel.edu>
Date: 11 May 91 15:15:38 GMT
References: <1991May10.202806.18512@ux1.cts.eiu.edu>
Organization: University of Delaware
Lines: 91