Debug (command)

Debug (command)

Infobox Software
name = Debug
author = Tim Paterson
developer = Microsoft
operating system = DOS, MS-DOS, OS/2, Microsoft Windows
genre = Debugger
website = [http://technet.microsoft.com/en-us/library/bb491040.aspx Debug]

debug is a command in DOS, MS-DOS, OS/2 and Microsoft Windows which runs the program debug.exe (or DEBUG.COM in older versions of DOS).cite web| author=Daniel B. Sedory|title=A Guide to DEBUG|accessdate=2007-05-25|url=http://mirror.href.com/thestarman/asm/debug/debug.htm|] Debug can act as an assembler, disassembler, or hex dump program allowing users to interactively examine memory contents (in assembly language, hexadecimal or ASCII), make changes, and selectively execute COM, EXE and other file types. It also has several subcommands which are used to access specific disk sectors, I/O ports and memory addresses. MS-DOS Debug runs at a 16-bit process level and therefore it is limited to 16-bit computer programs. FreeDOS Debug has a "DEBUGX" version supporting 32-bit DPMI programs as well.cite web|url=http://japheth.de/Debug/README.TXT|title=FreeDOS DEBUG README|date=|accessdate= 2007-06-25|author=Paul Vojta]

Background

Traditionally, all computers and operating systems have included a maintenance function, used to determine whether a program is working correctly.Fact|date=June 2007 Debug was written by Tim Paterson to serve this purpose in QDOS. When Paterson began working for Microsoft in the early 1980s he brought the program with him. Debug was part of DOS 1.00 and has been included in MS-DOS and Microsoft Windows. MS-DOS debug has several limitations:

* It can only access 16-bit registers and not 32-bit extended registers.
* When the "n" subcommand for naming files is used the filename is stored from offset DS:5D to DS:67 meaning that the program can only save files in FAT12 format.
* MS-DOS Debug can only access conventional memory, which is the first 640K in an IBM PC.

32-bit Debug clones, such as FreeDOS Debug, have been written.

yntax

debug [Drive:] [Path] FileName [parameters]

When Debug is started without any parameters the Debug prompt, a "-", appears. The user can then enter one of several one or two-letter subcommands, including "a" to enter the assembler mode, "d" to perform a hexadecimal dump, "t" to trace and "u" to unassemble (disassemble) a program in memory. [cite web|title=Microsoft TechNet Debug article|url=http://technet.microsoft.com/en-us/library/bb491040.aspx|accessdate=2008-04-23] Debug can also be used as a "debug script" interpreter using the following syntax.

debug < FileName

A script file may contain Debug subcommands and assembly language instructions.cite web|title=Using Debug|url=http://kipirvine.com/asm/debug/Debug_Tutorial.pdf|accessdate=2007-06-23] This method can be used to create or edit binary files from batch files.

ee also

* List of DOS commands
* Edlin is another DOS tool written by Tim Paterson.
* SoftICE a modern debugger that inherited its syntax from DebugFact|date=June 2007

References

External links

* [http://mirror.href.com/thestarman/asm/debug/debug.htm A Guide to DEBUG]
* [http://www.computerhope.com/debughlp.htm Information about the debug command]
* [http://www.computerhope.com/rdebug.htm Computer Debug Routines / Machine Code]
* [http://help.fdos.org/en/hhstndrd/debug.htm] , [http://japheth.de/Debug/README.TXT] FreeDOS Debug


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • debug (command) — This article is about a shell command. For programming method, see Debugging. Debug Original author(s) Tim Paterson Developer(s) Microsoft Operating system DOS, MS DOS, OS/2, Microsoft …   Wikipedia

  • Debug — Тип отладчик Разработчик Tim Paterson (англ.) Операционная система DOS, MS DOS, OS/2, Microsoft Windows Сайт …   Википедия

  • Debug code — is computer code introduced to a computer program to test for errors or to help determine the cause of an error. It can be as simple as an echo command to print the value of a variable at certain points of a program. Modern integrated development …   Wikipedia

  • Command.com — Saltar a navegación, búsqueda command.com es el nombre del intérprete de comandos para DOS y versiones de Windows de 16/32bits (95/98/98 SE/Me). Al ser el primer programa que se ejecuta después del inicio, posee también el rol de la configuración …   Wikipedia Español

  • Command.com — Le programme COMMAND.COM est l interpréteur de commandes du système MS DOS. On ne le confondra pas avec cmd.exe, qui est l interpréteur de commande de Windows NT (Windows 2000, Windows XP...) et d OS/2. Les commandes de cmd.exe sont inspirées,… …   Wikipédia en Français

  • command.com — Desarrollador Seattle Computer Products, Microsoft Corporation, IBM, Novell y otros Información general Género Shell …   Wikipedia Español

  • Command Prompt — For other uses, see Command prompt (disambiguation). CMD redirects here. For other uses, see CMD (disambiguation). Command Prompt A component of Microsoft Windows …   Wikipedia

  • COMMAND.COM — Le programme COMMAND.COM est l interpréteur de commandes du systèmes DOS. On ne le confondra pas avec cmd.exe, qui est l interpréteur de commande de Windows NT (Windows 2000, Windows XP...) et d OS/2. Leur successeur depuis 2006 est Windows… …   Wikipédia en Français

  • cd (command) — cd, sometimes also available as chdir (change directory), is a command line command to change the current working directory in operating systems such as Unix, DOS, OS/2, AmigaOS (where if a bare path is given, cd is implied), Windows, and Linux.… …   Wikipedia

  • more (command) — more Example output of the more command Developer(s) Daniel Halbert Operating system Cross platform …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”