You are on page 1of 27

Computer Software

Information and help with Microsoft DOS

MS-DOS OVERVIEW

Below is a listing of each of the MS-DOS commands currently listed on Computer Hope and a brief
explanation of what each of the commands do. The below commands are all MS-DOS commands,
which means not all the below commands will work in your version of MS-DOS / Windows. Clicking
on the command will open the help page for that command.

COMMAND DESCRIPTION
ANSI.SYS Defines functions that change display graphics, control cursor movement, and
reassign keys.
APPEND Causes MS-DOS to look in other directories when editing a file or running a command.
ARP Displays, adds, and removes arp information from network devices.
ASSIGN Assign a drive letter to an alternate letter.
ASSOC View the file associations.
AT Schedule a time to execute commands or programs.
ATMADM Lists connections and addresses seen by Windows ATM call manager.
ATTRIB Display and change file attributes.
BATCH Recovery console command that executes a series of commands in a file.
BOOTCFG Recovery console command that allows a user to view, modify, and rebuild the
boot.ini
BREAK Enable / disable CTRL + C feature.
CACLS View and modify file ACL's.
CALL Calls a batch file from another batch file.
CD Changes directories.
CHCP Supplement the International keyboard and character set information.
CHDIR Changes directories.
CHKDSK Check the hard disk drive running FAT for errors.
CHKNTFS Check the hard disk drive running NTFS for errors.
CHOICE Specify a listing of multiple options within a batch file.
CLS Clears the screen.
CMD Opens the command interpreter.
COLOR Easily change the foreground and background color of the MS-DOS window.
COMMAND Opens the command interpreter.
COMP Compares files.
COMPACT Compresses and uncompress files.
CONTROL Open Control Panel icons from the MS-DOS prompt.
CONVERT Convert FAT to NTFS.
COPY Copy one or more files to an alternate location.
CTTY Change the computers input/output devices.
DATE View or change the systems date.
DEBUG Debug utility to create assembly programs to modify hardware settings.
DEFRAG Re-arrange the hard disk drive to help with loading programs.

1
DEL Deletes one or more files.
DELETE Recovery console command that deletes a file.
DELTREE Deletes one or more files and/or directories.
DIR List the contents of one or more directory.
DISABLE Recovery console command that disables Windows system services or drivers.
DISKCOMP Compare a disk with another disk.
DISKCOPY Copy the contents of one disk and place them on another disk.
DOSKEY Command to view and execute commands that have been run in the past.
DOSSHELL A GUI to help with early MS-DOS users.
DRIVPARM Enables overwrite of original device drivers.
ECHO Displays messages and enables and disables echo.
EDIT View and edit files.
EDLIN View and edit files.
EMM386 Load extended Memory Manager.
ENABLE Recovery console command to enable a disable service or driver.
ENDLOCAL Stops the localization of the environment changes enabled by the setlocal command.
ERASE Erase files from computer.
EXIT Exit from the command interpreter.
EXPAND Expand a Microsoft Windows file back to it's original format.
EXTRACT Extract files from the Microsoft Windows cabinets.
FASTHELP Displays a listing of MS-DOS commands and information about them.
FC Compare files.
FDISK Utility used to create partitions on the hard disk drive.
FIND Search for text within a file.
FINDSTR Searches for a string of text within a file.
FIXBOOT Writes a new boot sector.
FIXMBR Writes a new boot record to a disk drive.
FOR Boolean used in batch files.
FORMAT Command to erase and prepare a disk drive.
FTP Command to connect and operate on a FTP server.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Moves a batch file to a specific label or location.
GRAFTABL Show extended characters in graphics mode.
HELP Display a listing of commands and brief explanation.
IF Allows for batch files to perform conditional processing.
IFSHLP.SYS 32-bit file manager.
IPCONFIG Network command to view network adapter settings and assigned values.
KEYB Change layout of keyboard.
LABEL Change the label of a disk drive.
LH Load a device driver in to high memory.
LISTSVC Recovery console command that displays the services and drivers.
LOADFIX Load a program above the first 64k.
LOADHIGH Load a device driver in to high memory.
LOCK Lock the hard disk drive.
LOGON Recovery console command to list installations and enable administrator login.

2
MAP Displays the device name of a drive.
MD Command to create a new directory.
MEM Display memory on system.
MKDIR Command to create a new directory.
MODE Modify the port or display settings.
MORE Display one page at a time.
MOVE Move one or more files from one directory to another directory.
MSAV Early Microsoft Virus scanner.
MSD Diagnostics utility.
MSCDEX Utility used to load and provide access to the CD-ROM.
NBTSTAT Displays protocol statistics and current TCP/IP connections using NBT
NET Update, fix, or view the network or network settings
NETSH Configure dynamic and static network information from MS-DOS.
NETSTAT Display the TCP/IP network protocol statistics and information.
NLSFUNC Load country specific information.
NSLOOKUP Look up an IP address of a domain or host on a network.
PATH View and modify the computers path location.
PATHPING View and locate locations of network latency.
PAUSE Command used in batch files to stop the processing of a command.
PING Test / send information to another network computer or network device.
POPD Changes to the directory or network path stored by the pushd command.
POWER Conserve power with computer portables.
PRINT Prints data to a printer port.
PROMPT View and change the MS-DOS prompt.
PUSHD Stores a directory or network path in memory so it can be returned to at any time.
QBASIC Open the QBasic.
RD Removes an empty directory.
REN Renames a file or directory.
RENAME Renames a file or directory.
RMDIR Removes an empty directory.
ROUTE View and configure windows network route tables.
RUNAS Enables a user to execute a program on another computer.
SCANDISK Run the scandisk utility.
SCANREG Scan registry and recover registry from errors.
SET Change one variable or string to another.
SETLOCAL Enables local environments to be changed without affecting anything else.
SETVER Change MS-DOS version to trick older MS-DOS programs.
SHARE Installs support for file sharing and locking capabilities.
SHIFT Changes the position of replaceable parameters in a batch program.
SHUTDOWN Shutdown the computer from the MS-DOS prompt.

SMARTDRV Create a disk cache in conventional memory or extended memory.


SORT Sorts the input and displays the output to the screen.
START Start a separate window in Windows from the MS-DOS prompt.
SUBST Substitute a folder on your computer for another drive letter.

3
SWITCHES Remove add functions from MS-DOS.
SYS Transfer system files to disk drive.
TELNET Telnet to another computer / device from the prompt.
TIME View or modify the system time.
TITLE Change the title of their MS-DOS window.
TRACERT Visually view a network packets route across a network.
TREE View a visual tree of the hard disk drive.
TYPE Display the contents of a file.
UNDELETE Undelete a file that has been deleted.
UNFORMAT Unformat a hard disk drive.
UNLOCK Unlock a disk drive.
VER Display the version information.
VERIFY Enables or disables the feature to determine if files have been written properly.
VOL Displays the volume information about the designated drive.
XCOPY Copy multiple files, directories, and/or drives from one location to another.

MS-DOS
Listing of secret and/or unknown MS-DOS commands and options.

Below is a listing of MS-DOS commands that are not listed in any available help manual or in the
commands syntax or are commonly unknown commands. Many of these commands that are known
can be very useful when using MS-DOS, while some of the other commands are unknown and/or
appear to do nothing.

Please use these commands cautiously, some of the commands can erase data and/or erase
data without warning.

ATTRIB , The command is short for ATTRIB -a -h -r - s *.* (removes all attributes
of a file).
BACKUP /HP Unknown
DIR , This lists all files including hidden files, does not work in Windows 95 /
98 / NT / 2000.
DIR ... Lists all directories that do not have extensions. In Windows 95 /
Windows 98 will list the contents of the directories previous to the
directory currently in.
DOSKEY Utilize doskey functions in MS-DOS command utilities such as edlin and
/APPEDIT debug.
DOSKEY Unknown
/COMMAND
DOSKEY Unknown
/PERMANENT
DOSKEY /SCRSIZE Unknown
DOSKEY Unknown
4
/XHISTORY
FDISK /MBR Recreates the Master Boot Record See CH000175 for additional
information.
FDISK /PRI See FDISK Page for additional information.
FDISK /EXT See FDISK Page for additional information.
FDISK /LOG See FDISK Page for additional information.
FDISK /Q Prevents fdisk from booting the system automatically after exiting
fdisk.
FDISK /STATUS Shows you the current status of your hard drives.
FORMAT Formats the hard drive without any prompting.
/AUTOTEST
FORMAT Like /AUTOTEST but it will ask you for a volume label.
/BACKUP
FORMAT /Z:n Command used with FDISK supporting FAT32, used to specify the cluster
size in bytes where n is multiplied by 512.
MEM /A or /ALL Adds a line into the MEM command tells the available space in HMA.
RESTORE /Y Unknown
RESTORE /Z Unknown
SET DIRCMD=0 Will make all directories hidden however still accessible, to get them
back SET DIRCMD=
SHARE /NC Unknown
TRUENAME When placed before a file, will display the whole directory in which it
exists.
VER /R Tells you the Revision and if DOS is in HMA.

Computer Hardware
PC Compatible memory diagram.

Below is is an illustration of the four sections of memory. All of the below specifications are
conclusive for all IBM compatible computers.

XMS
Remainder of all Memory above 1MB except
the first 640KB
External memory (XMS) - directly
accessible memory starting at 1 MB
requires HIMEM.SYS as an external
memory manager (loaded in
config.sys) 80386 Limited to 16 MB
5
80286 Limited to 8 MB

XMS Definition
HMA
First 64KB of memory Beyond 1MB
High memory area (HMA) - first 64 KB
of XMS also requires HIMEM.SYS as an
external memory manager (loaded in
config.sys) Only 1 program at a time
can access HMA Commonly used for
loading DOS "high", but also used for
TSRs.

HMA Definition
UMB
384KB
Upper memory area (UMA) is located
between 640KB and 1MB. Contains the
ROM BIOS, device controller ROM, and
video controller ROM and RAM

UMB Definition
CONVENTIONAL
640KB
(This is static and will never change no
matter how much ram you have in the
computer.
Conventional memory - traditionally
was the only memory available to DOS
It contains devices drivers,
conventional variables, the DOS
command Processor, TSRs application
programs, an data.

Conventional Memory definition

DOS APPLICATIONS
Below is a listing of the applications included with MS-DOS and the type of file extension it was. As
MS-DOS continued to grow, applications were removed and added. In this list you can see which
programs were included with your versions of MS-DOS. This list only applies for MS-DOS 2.x to 6.22.
As Windows grew into what it is today, many of the applications were removed or changed. If
you're running Windows 95 or higher and want to know if an application is available, see the
command page for that application or command.

Command Versions
2.0x 2.1x 3.00 3.1x 3.3x 4.0x 5.0 6.0 6.2 6.21

6
3.2x 5.00a 6.22
APPEND N/A N/A N/A EXE EXE EXE EXE EXE EXE EXE
ASSIGN COM COM COM COM COM COM COM N/A N/A N/A
ATTRIB N/A N/A EXE EXE EXE EXE EXE EXE EXE EXE
BACKUP COM COM COM COM COM COM EXE N/A N/A N/A
BASIC COM COM COM COM N/A N/A N/A N/A N/A N/A
BASICA COM COM COM COM N/A N/A N/A N/A N/A N/A
CHKDSK COM COM COM COM COM COM EXE EXE EXE EXE
CHOICE N/A N/A N/A N/A N/A N/A N/A COM COM COM
COMMAND COM COM COM COM COM COM COM COM COM COM
COMP COM COM COM COM COM COM EXE N/A N/A N/A
DBLSPACE N/A N/A N/A N/A N/A N/A N/A EXE EXE N/A
DEBUG COM COM COM COM COM COM EXE EXE EXE EXE
DEFRAG N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
DELTREE N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
DISKCOMP COM COM COM COM COM COM COM COM COM COM
DISKCOPY COM COM COM COM COM COM COM COM COM COM
DOSKEY N/A N/A N/A N/A N/A N/A COM COM COM COM
DOSSHELL N/A N/A N/A N/A N/A COM COM EXE N/A N/A
DOSSWAP N/A N/A N/A N/A N/A N/A EXE EXE N/A N/A
DRVSPACE N/A N/A N/A N/A N/A N/A N/A N/A N/A EXE
EDIT N/A N/A N/A N/A N/A N/A COM COM COM COM
EDLIN COM COM COM COM COM COM EXE N/A N/A N/A
EMM386 N/A N/A N/A N/A N/A N/A EXE EXE EXE EXE
EXE2BIN N/A EXE EXE EXE EXE EXE EXE N/A N/A N/A
EXPAND N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
FASTHELP N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
FASTOPEN N/A N/A N/A N/A EXE EXE EXE EXE EXE EXE
FC N/A N/A N/A N/A EXE EXE EXE EXE EXE EXE
FDISK COM COM COM COM COM EXE EXE EXE EXE EXE
FILESYS N/A N/A N/A N/A N/A EXE N/A N/A N/A N/A
FIND EXE EXE EXE EXE EXE EXE EXE EXE EXE EXE
FORMAT COM COM COM COM COM COM COM COM COM COM
GRAFTABL N/A N/A COM COM COM COM COM N/A N/A N/A
GRAPHICS COM COM COM COM COM COM COM COM COM COM
GWBASIC N/A N/A N/A N/A EXE EXE N/A N/A N/A N/A
HELP N/A N/A N/A N/A N/A N/A EXE COM COM COM
IFSFUNC N/A N/A N/A N/A N/A EXE N/A N/A N/A N/A
INTERLNK N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
INTERSVR N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
JOIN N/A N/A N/A EXE EXE EXE EXE N/A N/A N/A
KEYB N/A N/A N/A N/A COM COM COM COM COM COM
KEYBFR N/A N/A COM COM N/A N/A N/A N/A N/A N/A
KEYBGR N/A N/A COM COM N/A N/A N/A N/A N/A N/A
KEYBIT N/A N/A COM COM N/A N/A N/A N/A N/A N/A

7
KEYBSP N/A N/A COM COM N/A N/A N/A N/A N/A N/A
KEYBUK N/A N/A COM COM N/A N/A N/A N/A N/A N/A
LABEL N/A N/A COM COM COM COM EXE EXE EXE EXE
LINK EXE EXE EXE EXE EXE EXE N/A N/A N/A N/A
LOADFIX N/A N/A N/A N/A N/A N/A COM COM COM COM
MEM N/A N/A N/A N/A N/A EXE EXE EXE EXE EXE
MEMMAKER N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MIRROR N/A N/A N/A N/A N/A N/A COM N/A N/A N/A
MODE COM COM COM COM COM COM COM COM COM COM
MORE COM COM COM COM COM COM COM COM COM COM
MOVE N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MSBACKUP N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MSCDEX N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MSD N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MWAV N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MWAVTSR N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MWBACKUP N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
MWUNDEL N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
NLSFUNC N/A N/A N/A N/A EXE EXE EXE EXE EXE EXE
POWER N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
PRINT COM COM COM COM COM COM EXE EXE EXE EXE
QBASIC N/A N/A N/A N/A N/A N/A EXE EXE EXE EXE
RECOVER COM COM COM COM COM COM EXE N/A N/A N/A
REPLACE N/A N/A EXE N/A EXE EXE EXE EXE EXE EXE
RESTORE COM COM COM COM COM COM EXE EXE EXE EXE
SCANDISK N/A N/A N/A N/A N/A N/A N/A N/A EXE EXE
SELECT N/A N/A COM COM COM COM N/A N/A N/A N/A
SETVER N/A N/A N/A N/A N/A N/A EXE EXE EXE EXE
SHARE N/A N/A EXE EXE EXE EXE EXE EXE EXE EXE
SIZER N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
SMARTDRV N/A N/A N/A N/A N/A N/A N/A EXE EXE EXE
SMARTMON N/A N/A N/A N/A N/A N/A N/A EXE EXE N/A
SORT EXE EXE EXE EXE EXE EXE EXE EXE EXE EXE
SUBST N/A N/A N/A EXE EXE EXE EXE EXE EXE EXE
SYS COM COM COM COM COM COM COM COM COM COM
TREE COM COM COM COM COM COM COM COM COM COM
UNDELETE N/A N/A N/A N/A N/A N/A EXE EXE EXE EXE
UNFORMAT N/A N/A N/A N/A N/A N/A COM COM COM COM
VSAFE N/A N/A N/A N/A N/A N/A N/A COM COM COM
XCOPY N/A N/A N/A N/A EXE EXE EXE EXE EXE EXE

8
Computer Software
Information about the autoexec.bat and the config.sys.

QUICK LINKS REMARKING INFORMATION INDEX

About the autoexec / config Remarking lines within the


How to edit the files autoexec.bat or the config.sys Category:
Remarking information allows you to temporarily or Hardware
Getting additional memory permanently prevent a line from Software
Autoexec.bat layout loading each time you boot the
Config.sys layout computer. This is done by placing Companies:
None
Information about batch files "REM " in front of the line you wish
Technical support to skip.
Related Pages:
MS-DOS
ABOUT THE AUTOEXEC / CONFIG If you are encountering issues with Windows 3.x
a line in the autoexec.bat it is Windows 95
The autoexec.bat and the highly recommended that you Windows 98
config.sys were files created for remark the line instead of removing
MS-DOS and Windows 3.x as an easy it. This will prevent issues from
solution of loading the files arising if the line needs to be
required for various devices as well placed back into the autoexec.bat. RESOLVED
as the operating system to properly
run. These files are required for GETTING ADDITIONAL MEMORY
later revisions of MS-DOS and Were you able to
locate the answer to
Windows 3.x to load. Because The below commands will help your questions?
Microsoft is trying to steer away allow your computer to load
from MS-DOS, these files are not programs into memory more • Yes
required for Windows 95, Windows efficiently allowing you to have • No
98, Windows NT, Windows ME, more memory for MS-DOS programs
Windows 2000, Windows XP, or / games.
later operating systems. However,
in some cases it may still be Ensure you have the below three
necessary for users to edit or lines at the beginning of your
configure these files. config.sys file.

HOW TO EDIT THE FILES DEVICE=C:\WINDOWS\HIMEM.SYS


DOS=HIGH,UMB
DEVICE=C:\WINDOWS\EMM386.EXE NOEMS
The auotexec.bat and the
config.sys are most commonly
By placing the DOS=HIGH,UMB on
edited by the MS-DOS command file
the second line, this can, in some
Edit. To edit these files, type edit
cases, save memory because it is
c:\autoexec.bat to edit the
loading DOS into upper memory
autoexec.bat file, or edit
before loading the memory
c:\config.sys to edit the config.sys
manager. Additionally, the first and
file. If the mouse drivers are not
third lines cannot be loaded into
loaded properly you will not have
high memory because these lines
the capability of navigating the
are the memory managers.

9
mouse. Load all your devices in your
config.sys and autoexec.bat into
If you have Windows 95, Windows high memory.
98, or later versions of Windows it
is recommended that you use the
sysedit command; to run this
program, click Start / Run and type
sysedit.

AUTOEXEC.BAT LAYOUT

Below is an example of what an autoexec may look like:

@echo off
SET SOUND=C:\PROGRA~1\CREATIVE\CTSND
SET BLASTER=A220 I5 D1 H5 P330 E620 T6
SET PATH=C:\WINDOWS;C:\
LH C:\WINDOWS\COMMAND\MSCDEX.EXE /D:123
LH C:\MOUSE\MOUSE.EXE
DOSKEY
CLS

COMMAND EXPLANATION
@echo off Tells DOS to just read the lines but don't echo them
back to the screen.
SET This example is for the particular sound card that we
SOUND=C:\PROGRA~1\CREATIVE\CTSND have in one of the machines that we have. The set
sound is telling the computer to send all sound events
that the computer may run to that directory.
SET BLASTER=A220 I5 D1 H5 P330 E620 Tells the computer to set the sound blaster settings.
T6 This is a good line for game players; if you have this
line in your autoexec.bat you will know all settings for
your sound card. A220 = port address "220", I5 = IRQ 5,
D1 = DMA 1 usually being the settings you will need for
any game out on the market.
SET PATH=C:\WINDOWS;C:\ Sets the computer to look in the C:\windows directory
or the root if a command used at the prompt is not
found.
LH C:\WINDOWS\COMMAND\MSCDEX.EXE Line used for the CD-ROM. If you have Windows 95+,
/D:123 the MSCDEX will always be in the
C:\WINDOWS\COMMAND. In Windows 3.x or DOS, this
will usually be either in C:\DOS or C:\WINDOWS
directory. The /D:123 is the name of the driver name
that loads in upper memory; this can be anything,
usually /D:MSCD0001. However, this is not an actual
driver, this is just the name for the driver. Ensure if
you change this line that you change it in the config.sys
on your CD-ROM line. If the two are not the same, your
10
CD-ROM drive will not load.
LH C:\MOUSE\MOUSE.EXE Loads the mouse driver into memory. However, not all
mice use the same drivers. Although the mouse may use
mouse.exe it could also be "mouse.com" or "mouse.sys",
which is loaded in the config.sys.
C:\DOS\SMARTDRV.EXE /X Loads the smartdrive disk cache utility into memory.
See our smartdrv command page for additional
information about this utility.
DOSKEY Simple dos command to load DOSKEY into memory so
when in DOS you can use it without having to load it.
CLS MS-DOS command to clear screen.
WIN Used for users using Windows 3.x, this line will load
Windows automatically when booting the computer.

CONFIG.SYS LAYOUT

Below is an example of what the config.sys may look like:

DEVICE=C:\WINDOWS\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\WINDOWS\EMM386.EXE NOEMS
FILES=30
STACKS=0,0
BUFFERS=20
DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS
DEVICEHIGH=C:\MTMCDAI.SYS /D:123

COMMAND EXPLANATION
DEVICE=C:\WINDOWS\HIMEM.SYS The Himem.sys line is a very important line; this
line will allow you to load drivers into high
memory. If this line is not present, Windows 3.x
will not load.
DOS=HIGH,UMB This line will load DOS into high memory in an
upper memory block. Note the location usually
best placed after the HIMEM.SYS.
DEVICE=C:\WINDOWS\EMM386.EXE NOEMS The EMM386 line loads the extended memory
manager, however note that some MS-DOS
games have problems with extended memory
and will not run without the NOEMS statement.
FILES=30 The files line allow Windows to load 30 files at
the same time. Usually, however, going higher
may decrease the computer's performance; 30 is
found to work the best. Also ensure that this line
is all as one line and that there is not a space
between and after the =.
STACKS=0,0 The stacks line was first used in MS-DOS 3.2 and
11
was used to swap the stack whenever an
asynchronous hardware interrupt occurred. Later
in MS-DOS 3.3 the line STACKS=0,0 was added
into the config.sys. In special circumstances, this
line was changed to STACKS=9,128.

The STACKS statement has a range of 8-64, 32-


512. If a higher value is entered you will receive
a FATAL : Internal Stack Failure, System Halted
error message.
BUFFERS=20 Buffers line is to load buffers into memory
allowing Windows to load memory.
DEVICEHIGH=C:\WINDOWS\COMMAND\ANSI.SYS The ansi.sys line is a driver for DOS to allow you
to have different colors / sizes and special
characters at the DOS prompt.
DEVICEHIGH=C:\MTMCDAI.SYS /D:123 This line is the name of the CD-ROM driver on
the particular system we are working on. The
/D:123 represents the name of the driver, which
in this case is named 123, however, can be
named anything, usually MSCD0001. Note,
however, that /D:123 must be exactly the same
in config.sys and autoexec.bat; if they are
different, the CD-ROM will not work in DOS.
LASTDRIVE= Allows you to specify the last drive installed on
the computer. It is not recommended this line
be used unless you are using Windows 3.11 or
below. This line can cause issues with Windows
95 & 98 and will generally be remarked by
Windows automatically.
FCBS= Line used to specify the number of file-control
blocks for file sharing. This line should only be
used when programs require it, and today, is
generally not used or required. FCBS can utilize
between 1 and 255.

TECHNICAL SUPPORT
Reference Issue / Question
FORUM If your question is not listed on this page, please try our online forum.
Getting the mouse to work in MS-DOS
CH000007
As the computer boots I receive bad command or file name.
CH000210
How to get sound in MS-DOS.
CH000360
MS-DOS issues with Windows ME.

12
CH000361
Stack overflow system halted.
CH000382
Himem.sys missing or corrupt.
CH000425

DEBUG ROUTINES
Computer Debug Routines / Machine Code

DISCLAIMER LISTING OF ROUTINES INDEX

The below debug routines are TESTING PORTS


listed to help test and view CLEAR CMOS Category:
extended information on your PRINTER TEST Hardware
computer. However, some of these JOYSTICK TEST
debug routines can also potentially ERASE SECTOR 2 Companies:
damage computer components or ERASE ALL HDD INFORMATION None
cause them not to work properly. ERASE HDD AND CLEAR CMOS
Related Pages:
We are providing these debug DISCHARGE OLD LAPTOP Creating Batch Files
routines as a reference. If these BATTERIES Computer BIOS Help
cause problems with the computer REBOOT YOUR COMPUTER
they are run on, Computer Hope CREATE A SLEEP FILE FOR DOS
will not be held responsible for CHECK BIOS DATE
your actions. We recommend that VIDEO CARD TYPE RESOLVED
only experienced computer users
run these commands and that you UNDERSTANDING RESPONSES
are fully aware of the potential Were you able to
hazards of using these routines. Several of the debug routines listed locate the answer to
within this page as well as several your questions?
When running any of the below other of our pages will return
• Yes
routines you are agreeing to the responses in Hexadecimal format. It
• No
above statement. is recommended if you wish to
understand some of the code within
DEBUG ABCs these routines that you get a
familiarity of Hexadecimal. You can
Debug is a MS-DOS command which find information about Hexadecimal
can be used to enter machine as well as Binary on our Binary &
language into the computer either Hexadecimal page.
to create programs or test
computer peripherals by receiving POSSIBLE ISSUES
back various computer machine
code. If during the time you are typing
the debug routine you receive
Within this page as well as other ^error this is and indication that
pages you will begin to understand you have incorrectly typed
how to utilize this great method of something within the line just
13
testing computer hardware, as well completed. You can type the line
as learn the basics of machine again without causing any problems
code. with the routine.

Additional information on the MS-


DOS command debug can be found
on our debug page.

ENTERING DEBUG

Debug has been included in every version of MS-DOS as well as Windows. When running any of the
debug routines it is recommended that if you have Windows that you exit or shut down to get into
a real DOS prompt (unless you're running Windows ME, Windows 2000, Windows XP, or later
versions). Additional information about getting into MS-DOS can be found on document CHDOS.

Once at the MS- DOS prompt, run through the below example, this example is perfectly fine to run
on any PC Computer running MS-DOS / Windows and will not harm anything.

Type debug and press enter.


This should get you to a - (small dash). This is the debug prompt.
At the - type d40:00 and press enter; this will return several lines of information.
(See Testing Ports for explanation of this feedback.)
After the feedback you will be back to the debug prompt.
To exit out of debug type q and press enter. This will return you back to the MS-DOS prompt.

In some of the below debug routines you will notice that a "g" is typed, then "q". G tells the
computer that the code type is not self executing and must be run at this point. If completed, the
program will return Program Terminated Normally which indicates you can now quit from the
debug program.

TESTING PORTS

The below debug routine will check the ports of the computer to allow you to know if ports are
being detected or not.

Type debug to get to the "-"

Type D40:0

You should get several lines; however, the first line is the only important line, which should read
the following:

0040:0000 F8 03 F8 02 E8 03 E8 02 - 78 03 78 02 BC 03

F8 03 F8 02 E8 03 E8 02 78 03 78 02 BC 03
COM1 COM2 COM3 COM4 LPT1 LPT2 LPT3
14
The above graph shows you what the feed back means as far as port, so if you see F8 03, this
would be an indication that COM1 is being detected; if you see 00 00, this is an indication that it is
not being detected, which could mean that hardware is bad or that it is disabled in CMOS.

Once you have finished looking at the information, type Q and press enter to get out of Debug.

CLEAR CMOS

The below debug routine will clear CMOS, BIOS, Passwords, Settings, Viruses, and other items
residing in the CMOS. During this process you may get returned characters which are an indication
that the string has gone in, if you by chance get ERROR ensure that you have typed the line in
correctly, if not retype. Ensure that you do not skip any lines, that it is ALL typed in correctly to
help prevent problems. Before running this Debug routine also ensure that you have read the
above disclaimer.

After typing debug you will get "-" which is were you can begin by typing A and pressing enter.

A <ENTER>
MOV AX,0 <ENTER>
MOV AX,CX <ENTER>
OUT 70,AL <ENTER>
MOV AX,0 <ENTER>
OUT 71,AL <ENTER>
INC CX <ENTER>
CMP CX,100 <ENTER>
JB 103 <ENTER>
INT 20 <ENTER>
<ENTER> Note: Nothing is typed on this line
G <ENTER> By pressing G this will execute the above script, ensure you have read and agree to
the above disclaimer.
Q <ENTER>

Then reboot and you will get a Setup Checksum Error. Go into setup, correct all the incorrect
values, time, date...

JOYSTICK TEST

This test will test to see if your Joystick is present or not.

Type debug from the DOS prompt once at the "-".

Type i201

If you get a FF response attempt hold one of the main buttons on your joystick, and while holding
the button down type i201 and see if a different response is given, each button on the joystick
15
should return a different response. However, some special joysticks, such as the Microsoft
Sidewinder, which has more than 4-5 buttons, may not return a response for all extra buttons
because these buttons are generally controlled through software.

If a FF is still given on each of the buttons on the game paddle or joystick, it is a good possibility
that either the Joystick and or the Joystick port is bad. If possible, attempt these steps with
another known working joystick.

However, if you are receiving different responses when pressing and holding the keys on the
joystick, the computer hardware is working properly.

Type q and press enter to quit out of debug.

Extra Note: Computer Hope has experienced issues where this debug routine may not work under
Windows NT. If you are currently running Windows NT, refer to our page for Joystick installation
procedures.

See Joystick Help page for additional help.

ERASING SECTOR 2

Before doing the below routine ensure that you have read our disclaimer and that you're sure that
this is safe to do on your hard drive. Some computer hard drive manufacturers may void your
warranty if this routine is ran or in some situations this can cause damage to the hard drive. This
routine is useful in clearing DDO and unknown partitions. If this routine completes successfully it
will erase everything in Sector 2.

In the below debug routine, only type what is in bold from line 3 to 9, you will get a response if
typed in properly. If you get a response continue to type the bold text as shown below in the
below example.

A:\>debug

-FCS:200 400 0<enter>


-ACS:100<enter>
-xxxx:0100 mov ax,302<enter>
-xxxx:0103 mov bx,200<enter>
-xxxx:0106 mov cx,2<enter>
-xxxx:0109 mov dx, 80<enter>
-xxxx:010a int 13<enter>
-xxxx:010c int 20<enter>
-xxxx:0110 <enter>(without typing anything)
-g <enter>
Program terminated normally.
16
-q <enter>

ERASE ALL HDD INFORMATION

This debug routine is used to erase all partition information on the hard disk drive and is only
recommend for experienced users or users who are unable to delete the partition information
through fdisk.

In the below debug routine, only type what is in bold from line 3 to 8, you will get a response if
typed in properly. If you get a response continue to type the bold text as shown below in the
below example.

A:\>debug <enter>
-F 200 L1000 0 <enter>
-A CS:100 <enter>
xxxx:0100 MOV AX,301 <enter>
xxxx:0103 MOV BX,200 <enter>
xxxx:0106 MOV CX,1 <enter>
xxxx:0109 MOV DX,80 <enter>

(80 for hd 0 or 81 for hd 1 )

xxxx:010C INT 13 <enter>


xxxx:010E INT 20 <enter>
xxxx:0110 <enter>
-g <enter>
Program terminated normally
-q<enter>

Once this debug routine is complete, reboot computer and all partitions should be erased. Before
anything can be installed back onto the computer you must run Fdisk and recreate the partition as
well as format the hard disk drive.

Additional information about fdisk can be found on our fdisk page.

Additional information about format can be found on our format page.

ERASE HDD AND CLEAR CMOS

Before doing the below routine ensure that you read our disclaimer as well as are sure that this is
safe to do on your hard drive. Some computer hard drive manufacturers may void your warranty or
this may cause damage to the hard drive when doing the below example. This routine is useful in
clearing DDO and removing possible viruses. If this routine completes successfully it will erase
everything from your Hard drive as well as your reset your CMOS values.

In the below debug routine, only type what is in bold from line 3 to 17, you will get a response if

17
typed in properly. If you get a response continue to type the bold text as shown below in the
below example.

A:\>debug <enter>
-fcs:200 400 0 <enter>
-acs:100 <enter>
-xxxx:0100 mov ax, 0 <enter>
-xxxx:0103 mov ax, cx <enter>
-xxxx:0105 out 70, al <enter>
-xxxx:0107 mov ax, 0 <enter>
-xxxx:010a out 71,al <enter>
-xxxx:010c inc cx <enter>
-xxxx:010d cmp cx,100 <enter>
-xxxx:0111 jb 103 <enter>
-xxxx:0113 mov ax,302 <enter>
-xxxx:0116 mov bx,200 <enter>
-xxxx:0119 mov cx,1 <enter>
-xxxx:011c mov dx,80 <enter>
-xxxx:011f int 13 <enter>
-xxxx:012l int 20 <enter>
-xxxx:0123 <enter> (without typing anything.)
-g <enter>
program terminated normally
If you are doing this debug routine to clear out a possible virus turn off your computer and wait
and turn back on.
-q <enter>
Once back at DOS, reboot your computer

When your computer comes back on from doing the above you will get an error message as
booting up the computer, such as "Invalid Configuration". You must enter CMOS and set the time
and date, save, and reboot again. Once rebooted, you will then need to run fdisk and recreate the
partitions. Once created, you will then need to format the hard drive and proceed as normal.

DISCHARGE OLD LAPTOP BATTERIES

The below debug routine is used for older laptop batteries (i.e. batteries made from 1990-1992),
we do not recommend using this routine on any newer laptop batteries or any NiMH batteries

N DPDISCHG.COM <Enter>
A <Enter>
MOV DX,01E8 <Enter>
MOV AL,F9 <Enter>
OUT DX,AL <Enter>
INT 20 <Enter>
<Enter>
RCX <Enter>
10 <Enter>
W <Enter>
18
Q <Enter>

This will write dpdischg.com to the current directory. To run this utility type dpdischg.

REBOOT YOUR COMPUTER

Implement this debug routine to reboot your computer.

DEBUG

E 40:72 34 12
RCS
FFFF
RIP
0000
G

To create a batch file that reboots your computer without having to type the above command
each time, use the below example.

GOTO BEGIN

E 40:72 34 12
RCS
FFFF
RIP
0000
G

:BEGIN
DEBUG < REBOOT.BAT

CREATE A SLEEP FILE

This file allows your computer to sleep for a specified amount of time. This file is not dangerous in
any way; if typed improperly, more than likely the file will just not work.

Type Debug

You should get a "-" begin typing the below information; after each line you may get a response,
do not press enter and type the next line after the response.

N SLEEP.COM
A 100
MOV SI,0082
MOV AX,[SI]

19
XCHG AH,AL
XOR AX,3030
MOV BL,AL
MOV AL,0A
MUL AH
ADD AX,BX
MOV SI,AX
MOV AH,2C
INT 21
MOV BL,DH
MOV AX,SI
AAM
OR AX,3030
XCHG AH,AL
MOV [0160],AX
MOV AH,09
MOV DX,0160
INT 21
MOV AH,06
MOV DL,FF
INT 21
JZ 014C
OR AL,AL
JNZ 013F
MOV AH,08
INT 21
MOV AL,FF
MOV DX,016C
PUSH AX
MOV AH,09
INT 21
POP AX
MOV AH,4C
INT 21
MOV AH,2C
INT 21
CMP BL,DH
JZ 012D
MOV BL,DH
DEC SI
JNZ 011A
SUB AL,AL
MOV DX,016C
JMP 0142
DB "XX SECONDS", D, 24
DB " ", D, A, 24

RCX
79
W
20
Q

Tip: You may cut and paste the above test into a notepad document and save the file with a .scr
extension. Once saved from DOS, type debug < name of scr which should create the file; should
be created SLEEP.COM.

Note: This file is also available on our utility download page.

CHECK BIOS DATE

The below debug routine is to check the date of your BIOS. All BIOS dates on PC compatible
computers is stored at memory address FFFF5h. To display the date of your BIOS do the following:

At the C:\> type debug

- d FFFF:5 L 8

After typing the above command you should receive a string similar to:

FFFF:0000 30 34 2F-33 30 2F 39 38 4/30/98

The 4/30/98 would be the date of your computer BIOS.

Additional information about the computer BIOS can be found on our BIOS page.

VIDEO CARD TYPE

The below debug routine will list the type of video card within your computer. This is an excellent
way of determining the chipset on the card or the card within your computer without opening the
computer.

At the C:\> type debug

-d c000:0040

After typing the above command you should receive several lines of text similar to:

C000:0040 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ................
C000:0050 E9 63 7B 00 B4 10 49 27 - E9 FE 2B E9 F7 2B 50 4D .c{...I'..+..+PM
C000:0060 49 44 58 00 5B 00 00 00 - 00 A0 00 B0 00 B8 00 C0 IDX.[...........
C000:0070 00 5B 53 54 42 20 6E 56 - 49 44 49 41 20 54 4E 54 .[STB nVIDIA TNT
C000:0080 20 76 65 72 2E 20 31 2E - 31 30 20 0D 0A 00 1B 43 ver. 1.10 ....C
C000:0090 6F 70 79 72 69 67 68 74 - 28 43 29 31 39 39 38 20 opyright(C)1998
C000:00A0 53 54 42 20 53 79 73 74 - 65 6D 73 20 49 6E 63 0D STB Systems Inc.
C000:00B0 0A 00 22 6C 2C 0A 01 00 - C3 50 24 7F E8 60 36 58 .."1,....P$..'6X

21
As you can pick out in the above dump, this gives you enough information to determine the make
and the year made on the video card. On line 4 you can see the make of this video card, which in
this case is a N VIDIA TNT which would be the Riva TNT chipset. The next line you notice the
version of the card and finally the line thereafter is the copyright or the year manufactured,
generally.

If you are unable to capture any information which sounds like the video card, you can also type

-d c000:0090

The above line will give you a dump similar to the above example; however, it may have
additional information about the video card. Additional information about computer video cards
can be found on our Video Card page.

Computer Hardware
Information about computer Video Cards

QUICK LINKS REFRESH RATE INFORMATION INDEX

Video Card ABCs The monitor refresh rate is


Resolution information measured in Hz, which can also be Category:
Refresh rate information called frame rate, horizontal scan Hardware
DirectX Info rate, refresh rate, vertical
Video specifications frequency, or vertical scan rate. Companies:
Video Card standards When setting a monitor's Hz, for Click here
Video memory specifications example, 75 Hz, which is the Hz
Troubleshooting rate specified by VESA for any video Related Pages:
DirectX Info
Video definitions resolution above or equal to Alliance Promotion
640x480, means that the computer ATI
VIDEO CARD ABCs is going to redraw the screen 75 Boca
times per second. Chips
Video cards (video boards / video Cirrus Logic
Diamond
display boards / graphics cards / Refresh rates below 75 Hz can Hercules
graphics adapter) are physical produce an often-imperceptible LCD
hardware circuit boards that flicker that can cause eyestrain Matrox
connect to the Motherboard. Video after long viewing. While some Monitor
cards are also now being placed cards can support as high as 120 Hz, Number Nine
Oak Technologies
onto the computer motherboard to sometimes even higher, it is Paradise
help bring the cost down on recommended you run 85-90 Hz; S3
computers. When the video card is rates beyond 90 Hz add an SIS
connected to a monitor, it serves as unnecessary processing burden. Western Digital
the visual link between you and
your computer, allowing you to DIRECTX INFO
view and manage your computer's
First released in 1996, DirectX is a DRIVERS
22
software data. set of APIs (Application Program
Interface) developed by Microsoft
Video Cards must specify its video to allow all programs to write Video Card Drivers
standards, allowing end users to instructions for hardware without
know what video cards may or may knowing exactly what hardware is
not be capable of doing. With new within the computer. Games which
computers, you will most likely find include DirectX will have the RESOLVED
SVGA standard video cards, capability of utilizing multimedia
allowing you to run the majority of and graphics accelerator features
software applications as well as run more efficiently. See our DirectX Were you able to
locate the answer to
at high resolutions. page for complete information and your questions?
help with DirectX.
Generally, most video cards • Yes
shipped today are included with VIDEO SPECIFICATIONS • No
video memory. Video memory is
built onto the video board and/or
motherboard, allowing the video
card to run at higher resolutions
and run at more efficient speeds.

Video cards are most commonly


found in the PCI slots; however,
with the release of the Pentium II
came the AGP (Advanced Graphics
Port) support. This new type of slot
was released on August 26, 1996. The above picture illustrates a 15
This new technology allows the Pin Video Port connector pin
card to run at 66 MHz, 32-bit bus. assignments as well as size
dimension. Below is a chart
With the increasing popularity of explaining each function of a Video
advanced gaming came a new Port connector.
breed of video cards known as the
3D accelerators. When originally PIN FUNCTION
released, these cards only had 1 Red Video
support for 3D and not 2D and 2 Green Video
commonly required an additional 3 Blue Video
2D card to fully work. Today, 3D 4 Monitor ID 2
accelerators support both 3D and TTL Ground
2D, contains several MB of memory 5
(monitor self-test)
and processor on the video card. Red Analog
6
Ground
RESOLUTION INFORMATION Green Analog
7
Ground
The below information applies to a Blue Analog
8
desktop CRT monitor's resolution. If Ground
you would like more information Key (Plugged
9
about LCD display resolutions, Hole)
please see our LCD page. 10 Sync Ground
11 Monitor ID 0
The below image is an example of a 12 Monitor ID 1
23
screen running at 640 x 480 which 13 Horizontal Sync
means 640 pixels are going 14 Vertical Sync
horizontally by 480 pixels going 15 Monitor ID 3
vertically. When increasing the
resolution, the image will become
smaller due to the screen displaying
more pixels per inch.

When setting the resolution higher


you must have the needed Video
Ram to support that resolution. If
by chance you set your resolution
higher than supported by your
computer's hardware, you will need
to follow the below steps to change
the resolution depending upon
operating system.

For help in setting the video


resolution on your computer, please
see our troubleshooting video card
section.

VIDEO CARD STANDARDS

Below is a listing of the most commonly found video standards in new and old computers. Within
this chart, under the specifications column, you will find the types of resolutions this standard is
capable of running.

DISPLAY SPECIFICATIONS MANUFACTURER


Monochrome only , text-only standard, text display Developed by IBM
at 80 x 25
MDA
Max of 720 x 350 resolution however each individual
pixel is not accessible, because text-only.
CGA Max of 640 x 200 (Monochrome) in Graphics Mode. Developed by IBM
Color Graphics Max of 160 x 200 (16 colors) in Graphics Mode.
Adapter Max of 80 x 25 resolution in Text Mode.
24
EGA Max of 640 x 350 (16 colors, 60Hz) in Graphics Mode. Developed by IBM in
Enhanced Graphics Max of 80 x 25 resolution in Text Mode. 1984
Adapter
PGA Max of 640 x 400 Developed by IBM
Professional
Graphics Adapter
VGA Max of 640 x 480 (16 colors) in Graphics Mode. Developed by IBM in
Video Graphics Max of 320 x 200 (256 colors) in Graphics Mode. 1987
Adapter Max of 720 x 400 resolution in Text Mode.
XGA Upgrade to the VGA video card. Developed by IBM in
Extended graphics Max of 1,024 x 768 (256 colors) in Graphics mode. 1990.
array
SVGA Dependent upon the amount of Video memory see
No real definition below chart for all available modes.
however
commonly referred
to as
Super Video
Graphics adapter.
SXGA Max of 1400x1050 in Graphics Mode
Super XGA
UXGA Max of 1600x1200 in Graphics Mode
Ultra XGA
WSXGA Supports resolution of 1600 x 900 pixels or 1600 x
Wide SXGA 1024 pixels
WUXGA
Wided UXGA
WXGA Max of 1366x768 resolution.
Wide XGA

VIDEO MEMORY SPECIFICATIONS

As the video resolution and color depth increases, so do the required available resources. The
below chart illustrates all of the resolutions and color depths available for PC computers and the
amount of memory each of them take.

RESOLUTION / COLOR 512K 1MB 2MB 4MB 6MB


640 x 480 @ 8-Bit 256 Colors X X X X X
640 x 480 @ 16-Bit (65,000 Colors) X X X X
640 x 480 @ 24-Bit (16.7 Million Colors) X X X X
800 x 600 @ 8-Bit 256 Colors X X X X X
800 x 600 @ 16-Bit (65,000 Colors) X X X X
800 x 600 @ 24-Bit (16.7 Million Colors) X X X
1024 x 768 @ 8-Bit 256 Colors X X X X
1024 x 768 @ 16-Bit (65,000 Colors) X X X

25
1024 x 768 @ 24-Bit (16.7 Million Colors) X X
1152 x 1024 @ 8-Bit 256 Colors X X X
1152 x 1024 @ 16-Bit (65,000 Colors) X X X
1152 x 1024 @ 24-Bit (16.7 Million Colors) X X
1280 x 1024 @ 8-Bit 256 Colors X X X
1280 x 1024 @ 16-Bit (65,000 Colors) X X
1280 x 1024 @ 24-Bit (16.7 Million Colors) X X
1600 x 1200 @ 8-Bit 256 Colors X X X
1600 x 1200 @ 16-Bit (65,000 Colors) X X
1600 x 1200 @ 24-Bit (16.7 Million Colors) X

TECHNICAL SUPPORT

General Video Card Support


MS-DOS / Windows 3.x Video Card Support
Microsoft Windows 95, 98, ME, NT, 2000 Video Card Support
Monitor information and help

GENERAL VIDEO SUPPORT


Reference Issue / Question
CHADD Additional information with installing computer hardware.
Drivers Video card drivers and manufacturer listing.
FORUM If your question is not listed on this page please try our online forum.
CH000188 What is Video Palette Snooping?
CH000193 Issues with adding new video card to computer that has on-board video.
CH000194 My monitor shifts when changing the resolution.
CH000195 Is it possible to have two video cards in one computer?
CH000258 How do I determine what type of video card I have?
CH000307 Determining the PCI Version.
CH000308 Determining the AGP Version.
CH000315 Black borders on side of screen.
CH000407 2464 configuration error at boot.
CH000438 No Input Signal message.
CH000541 I downloaded a video but I can only hear it and not see it.
CH000558 How to change a monitor refresh rate.
CH000843 How can I have a multiple monitor display on my computer?
CH000894 How can I split one large display into two?

MS-DOS / WINDOWS 3.X VIDEO CARD SUPPORT


Reference Issue / Question
26
CH000115 Changing and or viewing video settings within MS-DOS.
CH000189 How to set the resolution or change the resolution/adapter in Windows 3.x

MICROSOFT WINDOWS 95, 98, ME, NT, 2000 and XP VIDEO CARD SUPPORT
Reference Issue / Question
CH000035 Lost video after upgrading to Windows 98.
CH000121 Distorted video after increasing the resolution in Windows.
CH000145 Which version of Windows 95 supports AGP?
CH000170 After Windows NT 4.0 installation video only runs at 16 colors.
CH000173 Multiple display Windows 2000 troubleshooting steps.
CH000190 How to set the resolution in Microsoft Windows.
CH000191 Unable to increase the resolution in Windows.
CH000195 Is it possible to have two video cards in one computer?
CH000292 Where to get OpenGL drivers?
CH000378 Set Windows font to big to change back.
CH000557 Windows fonts are poor quality and not smooth.
CH000560 Flipped monitor display in Windows.
CH000567 Black and white picture with laptop connected to TV.

27

You might also like