Debug is a byte editor that enables files to be viewed and modified at the byte level. It is generally recommended that this utility is not used by the faint of heart or when under the influence of drugs or alcohol. There is no "undo" command, so make a backup before playing, eh?
Syntax:
DEBUG [filename]
Once Debug has been called, the somewhat cryptic "Debug prompt", a hyphen (-), is displayed. At the prompt, the following "Debug commands" are valid:
Command | Parameters | Action |
? | . | This list of Debug commands. |
A | [address] | assemble |
C | range address | compare |
D | [startaddress [endaddress|L range]] | Displays (part of) a segment of memory. By default startaddress is offset 100 of the first free segment of memory, or offset 100 of the segment containing a file loaded by Debug. The default endaddress is 017F (ie. a range of 128 bytes). |
E | address [list] | enter |
F | range list | fill |
G | [=address] [addresses] | go |
H | value1 value2 | hex |
I | port | input |
L | - | Loads a previously "named" (see N) file into memory where it can be viewed/edited. |
L | number | Used with commands accepting a "range" argument to denote a number of bytes. Typically used in arguments as: startaddress L number. If number should take endaddress past the end of the segment, then number is truncated so the endaddress is the last byte of the segment. |
M | range address | move |
N | [path] filename [arglist] | "Names" a file for Debug. A file must be "named" before it can be loaded for viewing/editing. |
O | port byte | output |
P | [=address] [number] | proceed |
Q | . | Exit Debug. |
R | [register] | register |
S | range list | search |
T | [=address] [value] | trace |
U | [range] | unassemble |
W | [address] [drive] [firstsector] [number] | write |
XA | [#pages] | allocate expanded memory |
XD | [handle] | de-allocate expanded memory |
XM | [Lpage] [Ppage] [handle] | map expanded memory pages |
XS | . | display expanded memory status |
Notes
- Debug.exe is one of those little programs that, in the hands of a skilled user, is an amazingly powerful tool with which one can view and edit the contents of memory both short term (RAM) and long term (hard/floppy/tape media). One can also compile (and, up to a point, decompile) assembly language code.
- After struggling for some time to come to grips with the ins and outs of Debug, I have finally decided to leave the explanations to others.
File Details
File Name | Default Location | Dos Ver. | Win Ver. | Size | Date | Source |
Debug.exe | c:\windows\command |
7.0 | Win95 |
20 522 | 11/07/95 | win95_02.cab |
7.1 | Win95 (OSR2.x) |
20 5541 | 24/08/96 | win95_02.cab |
Win98 |
20 5541 | 11/05/98 | win98_40.cab |
Win98 SE |
20 5541 | 23/04/99 | win98_45.cab |
Superscripts denote which same size files, if any, are identical (using FC).
Further Reference
DOS Debug Tutorial - Fran Golden | A comprehensive guide to DEBUG that starts with an introduction to machine code, moves on to assembly language |
|