Links

Friday, September 11, 2009

DOS Chapter 2 Internal and external commands

Internal commands
Command.com, also known as the command interpreter, must be resident or loaded into memory in order to execute any commands at all. Internal commands are those which are built into the operating system; you will not find them in the DOS directory, neither do they have extensions.
The following MS-DOS 6.22 internal commands can be used at the prompt or in a batfile:
break
call
chcp
chdir (cd)
cls
copy
ctty
date
del (erase)
dir drv:
echo
for
if
load
loadhigh
mkdir (md)
path
pause prompt
rename (ren)
rmdir (rd)
set
time
type
ver
verify
vol
Break and set may also be used in config.sys.
Drv: is a variable internal command; depending on which drives are valid.
Goto and shift are internal commands which are batfile specific, ie. only used in batfiles. Rem is an internal command which may be used in batfiles and config.sys.
Internal commands will always execute before external commands. This is why external programs, including batfiles, must not have the same names as internal commands - if they do they will never execute.
The following MS-DOS 6.22 internal commands are config.sys specific:
buffers
country
device
devicehigh
dos
drivparm
fcbs files
include
install
installhigh
lastdrive
menucolor
menudefault menuitem
numlock
shell
stacks
submenu
switches
External commands
External commands are not a part of the operating system, as is command.com, but are independent [of the operating system] auxiliary files which, unlike internal commands, exist physically on your drive and therefore can be copied, moved or erased. The external commands shipped with DOS are provided to aid the user and are not required to run DOS, as is neither config.sys nor autoexec.bat.
For the purposes of this book the external commands provided with DOS will be referred to as external commands while all other commands that did not ship with DOS will be referred to as auxiliary commands. Any external command, however, can be used at the prompt or in a batfile.
For an external command to be executed by DOS; it must be in the current directory, entered along with the full path to where it is, or its directory must be in the DOS path.
Following are the MS-DOS 6.22 external commands:
append.exe
attrib.exe
chkdsk.exe
choice.com
debug.exe
defrag.exe
deltree.exe
diskcomp.com
diskcopy.com
drvspace.exe
edit.com
emm386.exe
expand.exe
fc.exe
fdisk.exe
find.exe
fasthelp.exe
fastopen.exe
format.com
graphics.com help.com
interlink.exe
intersvr.exe
keyb.com
label.exe
loadfix.exe
mem.exe
memmaker.exe
mode.com
more.com
move.exe
msav.exe
msbackup.exe
mscdex.exe
msd.exe
msav.exe
mwavtsr.exe
mwbackup.exe
mwundel.exe
nlsfunc.exe power.exe
print.exe
qbasic.exe
replace.exe
restore.exe
scandisk.exe
setup.exe
setver.exe
share.exe
sizer.exe
smartdrv.exe
smartmon.exe
sort.exe
subst.exe
sys.com
tree.com
undelete.exe
xcopy.exe
unformat.com
vsafe.com

DOS Chapter 1 The boot process

DOS stands for Disk Operating System and in this book we are dealing with a Microsoft variety, namely MS-DOS version 6.22. There are other DOS's; for example, IBM's PC-DOS and Digital Research's DR-DOS. If you have another DOS you will have to find out yourself what works, what doesn't, and what does not apply. An alternative would be to get the MS-DOS 6.22 so called "upgrade" package which has been available on the net. Keep in mind that whenever DOS is referred to in this book it is MS-DOS 6.22 (which I did not choose, by the way, it just happened to be the one which was available to me).
The three major MS-DOS system files are io.sys, msdos.sys and command.com. (In PC-DOS these files are known as ibmbio.com, ibmdos.com and command.com.) When you start your computer, the BIOS (Basic Input Output System) is activitated, which in turn, activates the DOS system files. Without getting into a lot of nitty gritty details, I will suffice it to say that this is the order in which the files are read:
1. io.sys
2. msdos.sys
3. drvspace.bin (optional - needed only to access drives compressed with drvspace.exe)
4. config.sys (optional)
5. command.com
6. autoexec.bat (optional)
All of these files (except command.com in special cases) must be in the boot root, which in this book is always referred to as c:\ (if your boot drive differs, please make a note of this). The special cases of command.com will addressed in the environment chapter.
After preliminary initialization your PC will display "Starting MS-DOS" on the screen. It is at this time, the F5 or F8 key combinations can be used. If F5 is pressed, config.sys and autoexec.bat are skipped. If Ctrl+F5 is pressed, drvspace.bin will also be skipped.
If the F8 key is pressed, the user can step through both config.sys and autoexec.bat one command at a time. If Ctrl+F8 is pressed, drvspace.bin will be skipped. After using F8 or Ctrl+F8, if you decide to carry out all the remaining commands, press Esc; if you decide to skip all the remaining commands, press F5.
The key combination Ctrl+Alt+Del will reboot the computer.
These features are especially useful in troubleshooting config.sys and autoexec.bat.

Search This Blog