Welcome again to all you beginners and to all the experts among our readers. Do not read this month's "Beginner's Tale" and the continuing troubles fm having. I don't want you to see how difficult PC ownership can be. Read instead the frolics of Tessa, Dave et al with the BBS, they are having fun while I can't even get the damn thing to boot. The Start Up Files, CONFIG.SYS and AUTOEXEC.BAT These two files strike terror into many hearts, especially mine when I was a Beginner. Even our President, Charles Wright, has expressed in the Green Guide his misgivings about CONFIG.SYS. In my early days I was too scared to have anything to do with these files, so let me tell you what I've since learned. That most helpful SIG convener and Dial Helper, Doug Brooke, has provided a 3-page document on these files and I am indebted to Doug for much of this month's instalment of Beginners' Bytes. When you switch on your PC your processor looks at a simple program stored permanently in ROM (Read Only Memory). Unknown to you it then goes through a series of boot programs, the last of which looks for a file named CONFIG.SYS. If that file is found, any instructions it contains are carried out. Control is then handed over to COMMAND.COM, the command interpreter, which then searches the root directory of your boot disk for a file named AUTOEXEC.BAT. If found, the commands in AUTOEXEC.BAT are executed one after another. Depending on what is in this file, you will then see the DOS prompt or perhaps your DOS shell menu or even your favourite program's opening screen. These "Startup Files" are not essential. You can start up without them, but they make it possible for you to have your PC operate exactly as you want it. Thus, everyone will have different versions of these files. You can create them and alter them as you wish. Here's how... Creating the Startup Files These files are simply lists of commands which you want carried out as your computer starts up. As both are simple text files they can be created with any word processor (be sure to use non-document mode or ASCII or whatever your word processor calls the plain text mode). I recommend you use DOS Editor if you have DOS 5 or 6. Brave souls with earlier DOS versions can use Edlin. Put each command on a separate line and be very careful to get punctuation etc. exactly right. Copy both these files into the root directory of your hard disk by issuing the command COPY CONFIG.SYS C:\ or COPY AUTOEXEC.BAT C:\ Protecting Your Startup Files I know you won't have time to read this if you have just got home with a new program, but you can read it before your second attempt at installation. The installation programs which come with some Applications may modify your Startup Files. Lots of people don't like this (I don't) and make their Startup Files read only, but that may lead to incorrect installation. My advice is to make copies of your CONFIG.SYS and AUTOEXEC.BAT in a different directory or on a floppy disk. It can be a long and tedious job restoring your lost startup files after some program has been at them. Some programs save your files under names like CONFIG.OLD and thus avoid the need to make copies. Check the Manual to see whether you are safe here. CONFIG.SYS This file configures (sets up) the computer system to function the way you want it to be. It is read by DOS only at startup, so if you change this file, you must reboot for your changes to take effect. If DOS cannot find a CONFIG.SYS file, then there are default values which DOS will use because you haven't specified anything different. CONFIG.SYS may contain configuration commands only. There are fifteen of these listed in your DOS 5 Manual. What are they? Allowable Commands Some typical commands are: FILES=nn (nn is a number). Sets the number of files which can be open at the same time. The default value is 8, but this is not enough for today's programs. The maximum number you can have open is 255, but a more common value is 30 or 40. Too many files open will use valuable memory so check your software manuals. BUFFERS=nn sets the number of small memory blocks (512 bytes) that DOS can use as storage when reading or writing to or from disk. Too few buffers will slow your system, again check the manuals of your Applications programs to see what is needed. BREAK=ON enables Ctrl+C to immediately terminate any operation. The default setting is OFF. Device Drivers There are a number of these which come with DOS, depending on your version. My CONFIG.SYS has the device drivers HIMEM.SYS, EMM386.EXE and ANSI.SYS as well as instructions to load them all into high memory. Thus my CONFIG.SYS allows me about 614 kB of conventional memory, and DOS allocates my other memory as required. Also, mouse drivers would appear here. You put a line like DEVICE=ANSI.SYS or DEVICEHIGH=ANSI.SYS in your CONFIG.SYS to make DOS load that device ready for you to use after your system boots up. DEVICEHIGH simply loads the device driver into high memory instead of conventional memory. For more discussion of memory read Tom Coleman's piece in PC Update, March 1994. A line for COUNTRY enables DOS to use the appropriate time, date and currency conventions. I have COUNTRY=061„ C:\DOS\COUNTRY.SYS which puts my dates and times in Australian format (dd,mm,yy). Doug Brooke has an interesting line which reads: SHELL=C:\COMMAND.COM /P /E:320 /F Doug comments, "The line prevents lockup if DOS cannot find the command processor. It also increases the environment from the default 160 bytes to 320 to cater for a long Path statement or a Backups complicated prompt. The environment is a space where DOS stores environment variables such as path, prompt and other values using the SET command. The / F (undocumented DOS command) overcomes the long delays when you try to log on to a floppy drive containing no disk." So your CONFIG.SYS file might look like this
One more command you will find very useful, although it isn't really a command. You put REM at the beginning of any line of your startup files. When DOS sees rem, it treats that line as a "descriptive comment" and takes no action. Thus, if you think the line that you just added to CONFIG.SYS or AUTOEXEC.BAT is creating a problem, don't delete it, it's quicker to REM it to see whether that cures the trouble.
The last line brings up a menu program from which I can easily select an Application. In my early days, as soon as I got my first hard disk, I heard muttering about backups and viruses. When I enquired about backups I was told to save the file I had been working on to a floppy disk, so that I had a backup copy in case of disaster. Of course, I soon had many, many floppies with copies of files everywhere, but ignorance is bliss and floppies are cheap, so why worry, I thought. |