Английская Википедия:Debug (command)
Шаблон:Short description
Шаблон:Use dmy dates
Шаблон:Use list-defined references
Шаблон:Infobox software
The line-oriented debugger DEBUG.EXE
is an external command in operating systems such as DOS, OS/2 and Windows (only in 16-bit/32-bit versions[1]).
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.
Overview
Traditionally, all computers and operating systems have included a maintenance function, used to determine whether a program is working correctly.Шаблон:Citation needed DEBUG was originally written by Tim Paterson to serve this purpose in 86-DOS. When Paterson began working for Microsoft in the early 1980s he brought the program with him. DEBUG was part of Шаблон:Nowrap and has been included in MS-DOS/PC DOS and certain versions of Microsoft Windows. Originally named DEBUG.COM
, the executable was renamed into DEBUG.EXE
with MS-DOS 3.2.[2]
Windows XP and later versions included DEBUG
for the MS-DOS subsystem to maintain MS-DOS compatibility. The 16-bit DOS commands are not available on 64-bit editions of Windows.[3]
The MS-DOS/PC DOS DEBUG has several limitations:
- In assembly/disassembly modes it only supports 8086 opcodes.
- 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 (the Program Segment Prefix File Control Block area), meaning that the program can only save files in FAT 8.3 filename format.
Enhanced DEBUG packages include the DEBUG command in Novell DOS 7, OpenDOS 7.01 and DR-DOS 7.02 and higher, a reimplementation of Digital Research's former Symbolic Instruction Debugger SID/SID86,[4] which came with former versions of DR DOS.[5][6][7] It is fully compatible with the DEBUG command line syntax of MS-DOS/PC DOS, but offers many enhancements, including supporting 16-bit and 32-bit opcodes up to the Pentium, an extended mode (/X) with dozens of additional commands and sub-modes, a much enhanced command line syntax with user-definable macros and symbolic debugging facilities with named registers, loaded symbol tables, mathematical operations and base conversions, as well as a commenting disassembler.[8][7] Some versions also utilized DPMS to function as a "stealth mode" protected-mode debugger.[9]
The FreeDOS version of DEBUG was developed by Paul Vojta and is licensed under the MIT License.[10]
A 32-bit clone "DEBUGX" version supporting 32-bit DPMI programs exists as well.[11] Andreas "Japheth" Grech, the author of the HX DOS extender, developed enhanced DEBUG versions 0.98 to 1.25, and former PC DOS developer Vernon C. Brooks added versions 1.26 to 1.32.[12]
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.[13] 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.[14] This method can be used to create or edit binary files from batch files.[2]
Using for non-debugging purposes
The DEBUG utility is useful for editing binary files in an environment where only DOS is installed without anything else. It can also be used to edit disk sectors, which is one method of removing boot-sector viruses.
Availability
Although technical documentation for the DEBUG command was removed with the release of MS-DOS 3.3, the command was retained in the standard distribution, unlike what was done with EXE2BIN.[15]
Other Operating Systems
The operating systems Intel ISIS-II[16] and iRMX 86,[17] DEC TOPS-10[18] and TOPS-20,[19] THEOS/OASIS,[20] Zilog Z80-RIO,[21] Stratus OpenVOS,[22] PC-MOS,[23] and AROS[24] also provide a DEBUG
command.
See also
- List of DOS commands
- DDT (CP/M command) (Dynamic Debugging Technique)
- SID (Symbolic Instruction Debugger)
- SYMDEB
- CodeView
- Turbo Debugger
- SoftICE
- DEBUG (tag)
References
External links
- ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокMASM for x64
не указан текст - ↑ 2,0 2,1 Ошибка цитирования Неверный тег
<ref>
; для сносокSedory
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокMS_subsystem
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокDR_1982_SID86
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокBorn_1993_DOS6
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокPaul_1997_DRDOSTIP
не указан текст - ↑ 7,0 7,1 Ошибка цитирования Неверный тег
<ref>
; для сносокPaul_2002_SID86
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокPaul_1997_NWDOSTIP
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокPaul_2001_NWDOSTIP
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокFreeDOS
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокVojta
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокBrooks_2014
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокTechNet
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокUsing_Debug
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокDror_1988
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокISIS
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокiRMX
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокTOPS-10
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокCMDref
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокOASIS
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокZ80-RIO
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокVOS
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокPC-MOS
не указан текст - ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокAROS
не указан текст
- Английская Википедия
- Страницы с неработающими файловыми ссылками
- Assemblers
- Debuggers
- Disassemblers
- External DOS commands
- Microsoft free software
- OS/2 commands
- Страницы, где используется шаблон "Навигационная таблица/Телепорт"
- Страницы с телепортом
- Википедия
- Статья из Википедии
- Статья из Английской Википедии
- Страницы с ошибками в примечаниях