<s>
The	O
line-oriented	O
debugger	B-Application
DEBUG.EXE	B-Device
is	O
an	O
external	O
command	O
in	O
operating	B-General_Concept
systems	I-General_Concept
such	O
as	O
DOS	B-Device
,	O
OS/2	B-Application
and	O
Windows	B-Application
(	O
only	O
in	O
16-bit/32	O
-bit	O
versions	O
)	O
.	O
</s>
<s>
DEBUG	B-Device
can	O
act	O
as	O
an	O
assembler	B-Language
,	O
disassembler	O
,	O
or	O
hex	O
dump	O
program	O
allowing	O
users	O
to	O
interactively	O
examine	O
memory	B-General_Concept
contents	O
(	O
in	O
assembly	B-Language
language	I-Language
,	O
hexadecimal	O
or	O
ASCII	B-Protocol
)	O
,	O
make	O
changes	O
,	O
and	O
selectively	O
execute	O
COM	O
,	O
EXE	O
and	O
other	O
file	O
types	O
.	O
</s>
<s>
It	O
also	O
has	O
several	O
subcommands	O
which	O
are	O
used	O
to	O
access	O
specific	O
disk	B-Application
sectors	I-Application
,	O
I/O	B-Architecture
ports	I-Architecture
and	O
memory	B-General_Concept
addresses	O
.	O
</s>
<s>
Traditionally	O
,	O
all	O
computers	O
and	O
operating	B-General_Concept
systems	I-General_Concept
have	O
included	O
a	O
maintenance	O
function	O
,	O
used	O
to	O
determine	O
whether	O
a	O
program	O
is	O
working	O
correctly	O
.	O
</s>
<s>
DEBUG	B-Device
was	O
originally	O
written	O
by	O
Tim	O
Paterson	O
to	O
serve	O
this	O
purpose	O
in	O
86-DOS	B-Operating_System
.	O
</s>
<s>
DEBUG	B-Device
was	O
part	O
of	O
and	O
has	O
been	O
included	O
in	O
MS-DOS/PC	O
DOS	B-Device
and	O
certain	O
versions	O
of	O
Microsoft	B-Application
Windows	I-Application
.	O
</s>
<s>
Originally	O
named	O
DEBUG.COM	B-Device
,	O
the	O
executable	O
was	O
renamed	O
into	O
DEBUG.EXE	B-Device
with	O
MS-DOS	B-Application
3.2	O
.	O
</s>
<s>
Windows	B-Application
XP	I-Application
and	O
later	O
versions	O
included	O
DEBUG	B-Device
for	O
the	O
MS-DOS	B-Application
subsystem	O
to	O
maintain	O
MS-DOS	B-Application
compatibility	O
.	O
</s>
<s>
The	O
16-bit	O
DOS	B-Operating_System
commands	I-Operating_System
are	O
not	O
available	O
on	O
64-bit	B-Device
editions	O
of	O
Windows	B-Application
.	O
</s>
<s>
The	O
MS-DOS/PCDOS	O
DEBUG	B-Device
has	O
several	O
limitations	O
:	O
</s>
<s>
In	O
assembly/disassembly	O
modes	O
it	O
only	O
supports	O
8086	B-General_Concept
opcodes	O
.	O
</s>
<s>
It	O
can	O
only	O
access	O
16-bit	O
registers	B-General_Concept
and	O
not	O
32-bit	O
extended	O
registers	B-General_Concept
.	O
</s>
<s>
When	O
the	O
"	O
N	O
"	O
subcommand	O
for	O
naming	O
files	O
is	O
used	O
,	O
the	O
filename	O
is	O
stored	O
from	O
offset	B-General_Concept
DS:5D	O
to	O
DS:67	O
(	O
the	O
Program	O
Segment	O
Prefix	O
File	B-Operating_System
Control	I-Operating_System
Block	I-Operating_System
area	O
)	O
,	O
meaning	O
that	O
the	O
program	O
can	O
only	O
save	O
files	O
in	O
FAT	O
8.3	O
filename	O
format	O
.	O
</s>
<s>
Enhanced	O
DEBUG	B-Device
packages	O
include	O
the	O
DEBUG	B-Device
command	O
in	O
Novell	O
DOS	B-Device
7	O
,	O
OpenDOS	O
7.01	O
and	O
DR-DOS	B-Application
7.02	O
and	O
higher	O
,	O
a	O
reimplementation	O
of	O
Digital	O
Research	O
's	O
former	O
Symbolic	O
Instruction	O
Debugger	B-Application
SID/SID86	O
,	O
which	O
came	O
with	O
former	O
versions	O
of	O
DR	B-Application
DOS	I-Application
.	O
</s>
<s>
It	O
is	O
fully	O
compatible	O
with	O
the	O
DEBUG	B-Device
command	O
line	O
syntax	O
of	O
MS-DOS/PCDOS	O
,	O
but	O
offers	O
many	O
enhancements	O
,	O
including	O
supporting	O
16-bit	O
and	O
32-bit	O
opcodes	O
up	O
to	O
the	O
Pentium	B-General_Concept
,	O
an	O
extended	O
mode	O
(	O
/X	O
)	O
with	O
dozens	O
of	O
additional	O
commands	O
and	O
sub-modes	O
,	O
a	O
much	O
enhanced	O
command	O
line	O
syntax	O
with	O
user-definable	O
macros	O
and	O
symbolic	O
debugging	O
facilities	O
with	O
named	O
registers	B-General_Concept
,	O
loaded	O
symbol	B-Application
tables	I-Application
,	O
mathematical	O
operations	O
and	O
base	O
conversions	O
,	O
as	O
well	O
as	O
a	O
commenting	O
disassembler	O
.	O
</s>
<s>
Some	O
versions	O
also	O
utilized	O
DPMS	O
to	O
function	O
as	O
a	O
"	O
stealth	O
mode	O
"	O
protected-mode	O
debugger	B-Application
.	O
</s>
<s>
The	O
FreeDOS	B-Application
version	O
of	O
DEBUG	B-Device
was	O
developed	O
by	O
Paul	O
Vojta	O
and	O
is	O
licensed	O
under	O
the	B-License
MIT	I-License
License	I-License
.	O
</s>
<s>
Andreas	O
"	O
Japheth	O
"	O
Grech	O
,	O
the	O
author	O
of	O
the	O
HX	B-Device
DOS	I-Device
extender	I-Device
,	O
developed	O
enhanced	O
DEBUG	B-Device
versions	O
0.98	O
to	O
1.25	O
,	O
and	O
former	O
PC	O
DOS	B-Device
developer	O
Vernon	O
C	O
.	O
Brooks	O
added	O
versions	O
1.26	O
to	O
1.32	O
.	O
</s>
<s>
When	O
DEBUG	B-Device
is	O
started	O
without	O
any	O
parameters	O
the	O
DEBUG	B-Device
prompt	O
,	O
a	O
"	O
-	O
"	O
appears	O
.	O
</s>
<s>
The	O
user	O
can	O
then	O
enter	O
one	O
of	O
several	O
one	O
or	O
two-letter	O
subcommands	O
,	O
including	O
"	O
A	O
"	O
to	O
enter	O
the	O
assembler	B-Language
mode	O
,	O
"	O
D	O
"	O
to	O
perform	O
a	O
hexadecimal	O
dump	O
,	O
"	O
T	O
"	O
to	O
trace	O
and	O
"	O
U	O
"	O
to	O
unassemble	O
(	O
disassemble	O
)	O
a	O
program	O
in	O
memory	B-General_Concept
.	O
</s>
<s>
DEBUG	B-Device
can	O
also	O
be	O
used	O
as	O
a	O
"	O
DEBUG	B-Device
script	O
"	O
interpreter	B-Application
using	O
the	O
following	O
syntax	O
.	O
</s>
<s>
A	O
script	O
file	O
may	O
contain	O
DEBUG	B-Device
subcommands	O
and	O
assembly	B-Language
language	I-Language
instructions	O
.	O
</s>
<s>
The	O
DEBUG	B-Device
utility	O
is	O
useful	O
for	O
editing	O
binary	O
files	O
in	O
an	O
environment	O
where	O
only	O
DOS	B-Device
is	O
installed	O
without	O
anything	O
else	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
used	O
to	O
edit	O
disk	B-Application
sectors	I-Application
,	O
which	O
is	O
one	O
method	O
of	O
removing	O
boot-sector	O
viruses	O
.	O
</s>
<s>
Although	O
technical	O
documentation	O
for	O
the	O
DEBUG	B-Device
command	O
was	O
removed	O
with	O
the	O
release	O
of	O
MS-DOS	B-Application
3.3	O
,	O
the	O
command	O
was	O
retained	O
in	O
the	O
standard	O
distribution	O
,	O
unlike	O
what	O
was	O
done	O
with	O
EXE2BIN	O
.	O
</s>
<s>
The	O
operating	B-General_Concept
systems	I-General_Concept
Intel	O
ISIS-II	O
and	O
iRMX	B-Operating_System
86	I-Operating_System
,	O
DEC	O
TOPS-10	B-Operating_System
and	O
TOPS-20	B-Operating_System
,	O
THEOS/OASIS	B-Device
,	O
Zilog	O
Z80-RIO	B-Device
,	O
Stratus	B-General_Concept
OpenVOS	I-General_Concept
,	O
PC-MOS	O
,	O
and	O
AROS	B-Application
also	O
provide	O
a	O
DEBUG	B-Device
command	O
.	O
</s>
