Copyright ABnormal Enterprises Inc © 1999
(To return to download window,
click on an Icon above)
Command Window
Overview:
The Dedicated Debugging Tool (DDT) is for
the user that wants to keep bugs out of his/her assembler programs.
A full screen debugging tool, DDT captures the interrupt vectors and allows users to enter in a number of ways. By setting breakpoints using DDT’s own tools, using the trap flag, embedding Int 3 instructions … or even the Print screen key; the user is able to view instructions, registers and/or memory as the users program executes..
On interrupt, the user video data is captured and the DDT display is invoked. In simple keyword style, registers and variables may be inspected and modified, similar to DEBUG but the full screen format, and intuitive aids assist in streamlining the debugging process.
Written using NASM and Nasm-IDE, it is the perfect complement to those tools. As I could not find a free full screen debugging tool on the web, I wrote one as an aid for my work on something else.. Also this is my working document. Functions and commands I am working on are highlighted in PINK and are not available YET !
One other thing. Yes, AEInc is sensitive to environmental issues and does support a worldwide ban on persistent chemicals. As a bug killer, here in cyber space, we just could not resist the name. In real life, the way to kill bugs is to be nice to the frogs!!!
Caveats:
Developed for use with NASM, it is offered as freeware with the following restrictions.
As the software has built in obsolescence dates, please don’t distribute
your copy, but rather refer others to the web site to pick up the latest
version.
Don’t defeat the obsolescence mechanism… although it is not difficult.
This gizmo is always under development, and I just want others to have
the latest version … its not a big download file.. And what the heck …
it is free.
There is no warranty expressed or implied. If you use this gizmo to enter
bad variables, destroy storage, munch the operating system or your hard
drive…. I don’t want the credit.
The utility is invoked without parameters It functions as a resident debugging tool and stays resident for as long as that DOS machine is not rebooted or the MsDOS window is not reinitialized. This utility is NOT for reverse engineering, but rather for debugging your own code. Start all your programs with an Int 3 instruction. When the Int 3 is executed, the utility traps it and gets control. When no debugging tool is active, the interrupts have no effect.
To just see DDT in action and play
with its commands, execute the batch file DDT-Popup
by clicking on the batch file, or enter the following
command.
Alternately, in MsDOS under Windows, or
standalone, just enter the following to the command prompts which accomplishes
the same thing. .
There are six different windows available
with the debugger. Each one is for a specific function. The window commands
are each two characters long. The utility also shifts between window automatically
based on different activities, as they occur.
The basic command window is broken down into zones. The upper left corner contains the segment registers and the auxiliary registers that pertain to each.
The registers in yellow may be modified
by entering a command followed by a value. The green areas are the actual
current values being used by the program undergoing debugging. Registers
may be specified by either there 16 bit or 32 bit names.
Examples:
ESI=EDI+EAX+123
is perfectly valid
This structure is valid throughout the
utility and almost all variables and commands function on either side of
the equals sign.
Segment Registers :
Segment registers are peculiar in that their entry is treated as a 20 bit value. When in 8086 or real address mode, they must be specified with a trailing 0 to properly enter them.
DS=1230
The trailing zero is required to cause proper calculation.
General Registers :
In the upper right corner of the command window are the general x8086 registers available for normal program usage.(consult Intel architecture for detailed discussion )
The following are all valid specifications.
Command Area:
The bottom area of the command window displays the interrupt status of the user program, the current instruction being executed and other useful; information
Commands are entered in the white area and the standard cursor positioning keys are functional in the standard ways. The insert, backspace, delete and cursor positioning arrows are intuitive.
Commands entered remain in the area after the ENTER key is pressed, but only data entered ahead of the current cursor position is read and executed upon. There is no need to delete the rest of the data on a line following the cursor position as it will be ignored. (see valid commands)
The area depicted in pink containing 1C-0D
will display the keyboard scan code and hexadecimal of the last keyboard
character struck. (On the actual DDT screen it is in dark blue)
Assemble/Disassemble Window:
To clear a vector, simply enter it without an equal sign or equate to another null vector. .
Breakpoint Window:
The utility may be used set intercept breaks in the users programs in a number of ways. The user may code in his own permanent breakpoints by using an Int 3instruction. Whenever the program executes one of these, the utility is invoked and up pops the command window. It is a good idea to place anInt 3 at the beginning of each program one writes, as they have no effect when no debug tool is running.
Additionally one may use the utility to place up to 9 breakpoints via
Once a breakpoint is executed, the utility is given control and the breakpoint disappears. Note that multiple breaks at the same address will keep interrupting until all of them clear, before resuming execution.
The B0 to B9 vectors are used identically to the A0 to A9 vectors.
The utility allows full usage of the Intel Debug registers when running native MsDOS. These facilities may NOT be invoked when Windows/95 is running or in an MsDOS or V8086 window, as the operating system suppresses their use.
The Memory Window:
The memory window provides both a hexadecimal
and ASCII display of main storage at the vectors set in a similar fashion
to the A0 to A9 vectors.
Note**When
using offsets from an assembly listing, because of the way NASM uses the
org
on com files, one has to add
100h to any offset listed to find
the variable in storage.
Trace
Window:
The trace window
and its facilities are not yet supported in this version of this utility.
Commands:
The utility allows the use of keywords in too many places to document. Most labels and identifiers can be used on either side of the equals sign. If in doubt, TRY IT. The module will let you know what works.
$ character:
There is one reserved word that is not
mentioned anywhere else. The $ is synonymous with entering CS+IP
or
CS+EIP.
It is used as a short form in much the same was as the assemblers use it.
V1=
$+20
might be handy in checking a jne
$+20h instruction
Hints, Tips & Tricks:
Clear
debug registers with the D0 command before rebooting, or before exiting
the program your interested it. Otherwise DDT will trap the operating system.
The same applies to the breakpoint registers B0-B9.
To
exit a program, set the instruction pointer to 0 and when the EX keyword
is processed, the program will resume with the DOS return instruction contained
in all program segment prefixes.
IP=0
and
then an EX
The segment registers are a special case
when tracing through POPs After a pop of a segment register, the
utility is not invoked for one instruction and the trace will not bee seen.
After a POP DS etc., put a NOP instruction when coding. While
this will not be seen during tracing, everything else will.
Re-booting
MsDOS from your ‘A’ drive and running standalone allows full debug register
function. Alternately use the breakpoint functions B0-B9.
With our web site at