DOS Lesson 4: External Commands; Emergency Boot Disk

Last week we looked at the internal commands of DOS. These commands
are contained within COMMAND.COM and are loaded during the boot sequence. Because of this, a certain amount of the limited DOS memory is committed to holding internal commands. Obviously, some commands do not need to be loaded into memory every time you boot, because they are used infrequently, or possibly because they are large and take up a lot of space. These commands are stored as separate files in your C:\DOS directory. (Usually; C:\DOS is the normal default, but during the installation it is possible to specify a different directory.) Let’s look at these external commands:

appendassignattribbackup
chkdskcommandcompdblspace
debugdefragdeloldosdeltree
diskcompdiskcopydoskeydosshell
editemm386exe2binexpand
fasthelpfastopenfcfdisk
findformatgraftablgraphics
helphimeminterlnkintersvr
joinkeyblabelmem
memmakermirrormodemore
msavmsbackupmscdexmsd
nlsfuncpowerprintreplace
restorescandiskselectsetver
sharesortsubstsys
treeundeleteunformatvsafe
xcopy   

Please note that you might not find all of these files on every computer. This will depend on things like which version of DOS you have installed. In some cases Microsoft replaced one file with a different file in later versions. An example of this is CHKDSK (i.e. “Check Disk”). This name survives in Windows NT, but in DOS (and later, Windows) this program/applet was replaced by the later SCANDISK. So look at this as a list of some of the files you might find on your computer. You may have some that are not on this list, as well. Also, note that other programs will sometimes install files in the DOS directory. In particular, Windows 3.x installed many of its files in this directory, and sometimes updated the versions that DOS originally installed. This can complicate the discussion a bit, but the basic files and how they operate is still going to follow the outline we will discuss.

One file that is very important, though it is not a DOS command, is the included copy of BASIC. In earlier versions of DOS this as called GWBASIC,
and in later versions, QBASIC. One of the important external commands, EDIT, is actually a BASIC program, and will not run unless BASIC is present. This is important to remember if you are preparing an emergency boot disk for DOS.

Extensions, Help, and associated files

External commands are files, and as such have file extensions. Generally these will be either *.EXE or *.COM. An *.EXE file is what is called an executable file. This is a file that is compiled to run as a program. To this day, any Windows program is run from an *.EXE file. The other type. *.COM, is the original “Dot Com”. This refers to a command file. A few of these files will be *.SYS, which are system files, such as the IO.SYS and MSDOS.SYS files we discussed in Lesson 2. Another file type is the *.OVL file, which means overlay. This file type is found with backup programs, particularly.

Often these external files will come with Help files as well. Help files have the extension *.HLP. If you have a dual-boot system with both DOS and Windows, you can open these *.HLP files using Windows’ built-in Help
File viewer.

Emergency Boot Disk

One of the things that anyone learning about DOS or about computers in general ought to have in their arsenal is a DOS Emergency Boot Disk. Let’s
assume you have DOS installed already on your C: drive, and you can boot into DOS. How do you create this emergency boot disk? You place a blank floppy disk in your A: drive, and at the C:\> command prompt use the command:

format a: /s

This command has three parts. First, it uses the external command FORMAT. Second, it applies this command to the a:, or floppy drive. The last
part is called a switch in DOS terminology. Many DOS commands have switches available to modify the command in some way. In this case, the
/s switch tells it to place the system files on the disk. Recall from Lesson 2 that this means that the hidden system files IO.SYS and MSDOS.SYS
will be placed very specifically in the very first sectors of the disk. Also,
COMMAND.COM will be placed in the root directory of the disk. This is enough to boot the computer. You may wish to add a CONFIG.SYS and AUTOEXEC.BAT on the disk as well. You can copy these from your hard drive if you wish, using the commands:

copy c:\config.sys a:

copy c:\autoexec.bat a:

You can modify these files later using the EDIT command to invoke
the DOS file editor.

At this point, you should test your boot disk by turning off the computer (if you are in DOS), placing the boot disk in the A: drive, and then turning on the power. If all goes well you should boot into DOS, though you will probably be asked to enter the date and time when you boot. If you boot
to the C:\> prompt, this means that the computer never even looked at the
boot disk, and this is set in the BIOS. Go into your BIOS, look for the setting
for “boot order” or “seek order”, and change it from something like “C,A” to “A,C”. Reboot, with your floppy disk in the A: drive, and see if your boot disk works properly.

Once you know you have a good boot disk, you should add a few things. All of the Internal commands are available because you have COMMAND.COM
on your disk. But you should also add some critical External commands:

  • attrib
  • chkdsk (or scandisk for later versions)
  • edit (remember that this will only work if you also add QBASIC)
  • fdisk
  • format
  • qbasic
  • undelete
  • unformat

If you have used disk compression there are additional issues involved, which are beyond the scope of this particular introductory discussion. The external commands listed above are critical for solving possible software problems with your computer. I recommend that anyone following this series create such a boot disk right away. This is a tool that any computer expert would have handy. I have several emergency boot disks that I carry in my organizer so that I will have them with me at all times.

 Save as PDF