debug (command)

debug (command)
Debug
Original author(s) Tim Paterson
Developer(s) Microsoft
Operating system DOS, MS-DOS, OS/2, Microsoft Windows
Type Debugger
Website Debug

debug is a command in DOS, MS-DOS, OS/2 and Microsoft Windows (only x86 versions, not x64[1]) which runs the program debug.exe (or DEBUG.COM in older versions of DOS).[2] 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.[3] MS-DOS Debug runs at a 16-bit process level and therefore it is limited to 16-bit computer programs.[2] FreeDOS Debug has a "DEBUGX" version supporting 32-bit DPMI programs as well.[4]

Contents

Background

Traditionally, all computers and operating systems have included a maintenance function, used to determine whether a program is working correctly.[citation needed] 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 FAT 8.3 filename format.
  • MS-DOS Debug can only access conventional memory,[2] which is the first 640K in an IBM PC.

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

Syntax

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.[5] 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.[3] This method can be used to create or edit binary files from batch files.[2]

See also

References

  1. ^ According to Microsoft Macro Assembler Reference, inline assembly is not supported for x64.
  2. ^ a b c d e Daniel B. Sedory. "A Guide to DEBUG". http://mirror.href.com/thestarman/asm/debug/debug.htm. Retrieved 2007-05-25. 
  3. ^ a b "Using Debug". http://kipirvine.com/asm/debug/Debug_Tutorial.pdf. Retrieved 2007-06-23. 
  4. ^ a b Paul Vojta. "FreeDOS DEBUG README". http://japheth.de/Debug/README.TXT. Retrieved 2007-06-25. 
  5. ^ "Microsoft TechNet Debug article". http://technet.microsoft.com/en-us/library/bb491040.aspx. Retrieved 2008-04-23. 

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • 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… …   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”