home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
asdt32.zip
/
ASDT32.INF
(
.txt
)
next >
Wrap
OS/2 Help File
|
1996-07-19
|
142KB
|
4,958 lines
ΓòÉΓòÉΓòÉ 1. Preface ΓòÉΓòÉΓòÉ
This manual describes the IBM Application/System Debug Tool, ASDT32, which aids
software debugging under IBM Operating System/2 2.1 and 3.0. Using ASDT32, you
can:
Debug OS/2 device drivers and applications that run in either the
protected or virtual 8086 mode. This includes both 16- and 32-bit
applications.
Gain control from OS/2 via INT 1, INT 3, NMI, or a hot key. Additionally,
gain control on certain error conditions (INT 0, INT 6, INT 8, INT '0C'x,
and INT '0D'x).
Step execution (single, multiple, or procedure).
Stop program execution at up to 162 specified points.
Display or alter processor registers.
Display or alter processor memory (ASCII or EBCDIC translation).
Display LDT, GDT, IDT, and page directory or page table entries.
Assign register or variable contents to other registers or variables.
Search memory to find a character string in hex, ASCII, or EBCDIC.
Compare two areas of memory.
Copy one area of memory to another.
Fill an area of memory with a specific character.
Disassemble blocks of instructions (AL86 or Intel (MASM) mnemonics). This
includes 80387 support.
Evaluate numeric expressions with scratch pad space for results.
Maintain a separate screen for your program.
Support PM mode for IBM adapters (VGA, 8514/A, XGA, and SVGA adapters
manufactured by S3 Incorporated).
Read in a profile during initialization phase for later execution.
Print out the ASDT32 screen, formatted instructions, or formatted memory.
Terminate the current process and return to OS/2.
Identify the invocation path of the current thread or of a thread
associated with a specific breakpoint.
Halt and resume threads to view screen groups or to begin a new OS/2
session.
Restore/take specific interrupts to/from OS/2 to support device drivers
that have a need to control these interrupts.
Use a remote terminal to view both your application screen and the ASDT32
screen at the same time.
Use the hardware debug registers to trap instruction execution or
specific memory reads or writes.
Time critical intervals with high resolution (in the microsecond range).
Use symbols to access Public addresses within your program.
Page in application memory for patching code, setting breakpoints, or
inspecting data.
ASDT32 uses a full screen format to display breakpoints, registers, memory,
disassembled instructions, and other information.
ΓòÉΓòÉΓòÉ 1.1. Release Information ΓòÉΓòÉΓòÉ
Release 1.2
This is the current release of ASDT32.
Release 1.2 contains the following changes and new features:
All keyboards are now supported without any patching.
The parameter line can now handle up to 300 characters.
The PD and PM commands can now be used to send their formatted dumps over
com1 or com2.
PM mode is now supported on SVGA chip sets manufactured by S3
Incorporated.
There were several bug fixes.
Release 1.1 contained the following changes and new features:
ASDT32 allows you to set hardware debug registers in code pages that are
not present.
ASDT32 shows the operand address of a physical disassembly line as
physical.
ASDT32 now supports certain clone adapters that use ROM based at
'C0000'x.
The NP command has been added. This command is used to page in one page
of application-level (not system-level!) memory. See NP - Not Present for
detailed usage of this feature.
The ET command has been altered to allow for 55 millisecond rollover. See
ET - Execute with Timing for detailed usage of this feature.
ASDT32 uses a task gate to monitor double faults. This allows for
capturing double faults that involve exhausted stack space.
Many bug fixes and workarounds were implemented for OS/2 3.0.
ΓòÉΓòÉΓòÉ 1.2. System Requirements ΓòÉΓòÉΓòÉ
ASDT32 runs on any personal system that can support OS/2 3.0. Note that this
implies that the system contains an 80386 chip or any super set. ASDT32 uses
approximately 130K of memory.
ΓòÉΓòÉΓòÉ 1.3. General Information ΓòÉΓòÉΓòÉ
File ASDT32 AVAIL on the IBMPC conferencing facility announces ASDT32. File
ASDT FORUM contains information and comments regarding ASDT32. Please add your
comments and suggestions.
The ASDT32 PACKAGE is available on the OS2TOOLS disk and includes the following
files:
ASDT32 ZIPBIN - ASDT32 executables and files related to the sample device
driver. You will need PKUNZIP2 from OS2TOOLS to break out the following
files:
- ASDT32.SYS - the first of two SYS files for ASDT32.
- ASDT322.SYS - the second of two SYS files for ASDT32.
- ASDT32SM.CMD - REXX (OS/2) module extracts Public map symbols.
- SAMPLEDD.SYS - a sample device driver for debug under ASDT32.
- SAMPLEDD.ASM - source for SAMPLEDD SYSBIN.
- SAMPLEDD.SYM - a symbol file for SAMPLEDD SYSBIN.
- SAMPLE.EXE - a sample executable for debug under ASDT32.
- SAMPLE.C - source for SAMPLE EXEBIN.
ASDT32 AVAIL - summary of release information for ASDT32.
ASDT32 PRO - a sample ASDT32 profile to be used with SAMPLEDD SYSBIN.
ASDT32 SCRIPT - the BookMaster source for this document.
ASDT32 TERS3820 - SCRIPTed, (TERSEd) ready-to-print form of this
document.
ASDT32 INFBIN - VIEWable file (under OS/2).
CASS appreciates the contributions of Chuck Bauman, Graeme Dougal, Al Heath,
Dennis Rowe, Bob Shay, Dave Toll, and Bill Wacholtz to ASDT32.
ΓòÉΓòÉΓòÉ 2. Getting Started ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 2.1. Introduction ΓòÉΓòÉΓòÉ
Note: If you install ASDT32 along with the kernel debugger, both debuggers may
behave unpredictably!
ASDT32 runs under IBM OS/2 3.0 as a device driver. It supports both the
protected and the virtual 8086 (any of the VDM sessions) modes. This user's
guide and reference manual deals mostly with the protected-mode aspects of
ASDT32. However, it points out some key areas of differences of ASDT32
interpretation when the underlying application is a virtual 8086 object. Where
the manual is not explicit about this, you should assume similar
interpretations for either mode.
The device driver or application program that you wish to debug should contain
an INT 3 at a location where you want ASDT32 to gain control the first time.
This location is often the first instruction of your device driver or
application program.
You can also make ASDT32 gain control through an NMI or a hot key. The ASDT32
hot key defaults to the PrtSc key, which must be activated before ASDT32 will
recognize it as a request to obtain control. You can activate the hot key
either by using the SK command (see SK - Set Keyboard Hot Key) or by using the
/K option discussed below.
ΓòÉΓòÉΓòÉ 2.2. Installing ASDT32 ΓòÉΓòÉΓòÉ
To install ASDT32, add the following commands to your CONFIG.SYS file:
DEVICE=ASDT32.SYS [profile] [symfile] [options]
DEVICE=ASDT322.SYS
where: profile - a file containing ASDT32 commands (file name
must be fully qualified)
symfile - a file containing extracted Public data that
has been created by ASDT32SM.CMD (file name
must be fully qualified)
options -
/K=nn - set up a hot key (nn is optional and
represents the scan code that you want to
serve as the hot key)
/R=n - have ASDT32 use a remote terminal (n is either
1 or 2 for COMn)
/U=nn - specify the user mask for ASDT32 (nn represents
the user mask)
/W - have ASDT32 use window assumptions
/n - (where n is one of 0, 1, 2, 3, 6, 8, C, or D)
have ASDT32 not take over INT n
This allows OS/2 3.0 to install ASDT32 as a device driver. After installation,
ASDT32 can gain control on various interrupts or a hot key.
If you want to debug another device driver during its initialization phase,
make sure ASDT32 is installed prior to that device driver in your CONFIG.SYS
file.
ΓòÉΓòÉΓòÉ 2.2.1. ASDT32 Parameters ΓòÉΓòÉΓòÉ
You may specify an ASDT32 profile file name for ASDT32 to read in. Once ASDT32
is in control, you can execute your profile with the EP command. See EP -
Execute Profile for more information.
You may specify an ASDT32 symbol file name for ASDT32 to read in. Once ASDT32
is in control, you can use the '@' trigger to access the symbols in this file.
The QS and WI commands are used in association with symbols. See QS - Qualify
Segment Number and WI - What is Address for more information.
/K causes ASDT32 to get control whenever you press the hot key. The hot key
defaults to the PrtSc key. However, if you use the /K=nn form of this option,
ASDT32 will define the nn scan code as the hot key. E.g., /K=4A will set the
keypad minus as the hot key. Use the hot key to give control to ASDT32 from
your application, the OS/2 PM shell, etc. See SK - Set Keyboard Hot Key for
more information.
/R=n causes ASDT32 to use a remote terminal for debugging if you have one
hooked up via COMn (n=1 or 2). See CG - Configuration for more information.
/U=nn changes the user mask default from '00'x to 'nn'x for the 8259 interrupt
controller register. See UM - User Mask for more information.
/W causes ASDT32 to make certain assumptions about offset assignments to
specific ASDT32 variables. See WA - Window Assumptions for more information.
/n causes ASDT32 not to take over a specific interrupt during its installation.
This allows your device driver to control that interrupt or to prevent
contention between ASDT32 and any other debugger that you may want to use
concurrently.
Note: Many 16-bit applications make OS/2 system calls with an odd number of
bytes of parameters. Since OS/2 3.0 uses 80386 call gates for these system
calls, stack faults can frequently occur. OS/2 3.0 makes allowances for this,
and absorbs the stack fault such that it is not noticed by the user. ASDT32 on
the other hand will stop the application and display the stack fault if it owns
the stack fault interrupt.
To prevent this, you should use the /C startup parameter. Later, while in
ASDT32, you can issue the TI command to have ASDT32 regain control of the stack
fault interrupt if you want it to monitor stack faults. See RI - Restore
Interrupt for more information.
ΓòÉΓòÉΓòÉ 2.3. How to Begin Debugging with ASDT32 ΓòÉΓòÉΓòÉ
To begin debugging, you need to know how to do several key things. The
following list describes these debugging steps and assumes the default ASDT32
function keys are set.
Debug Task ASDT32 Command to Use
Start ASDT32 To cause ASDT32 to take control from OS/2, run the program
you wish to debug making sure it contains an INT 3
instruction ('CC'x).
Note: ASDT32 can gain control through several interrupts.
However, an INT 3 instruction that has been inserted into
your program is the most common interrupt taken.
Single Step ST (key F8)
Executes one instruction in your program.
Set Breakpoints Sn
Sets one of the breakpoints to an address in your program.
Examples: "S1 = CS:EIP+23" sets a breakpoint 23 bytes
from the instruction about to be executed.
Execute EX (key F7)
Executes your program until it terminates, until it
reaches a breakpoint, or until it reaches an
ASDT32-captured interrupt.
Set Registers Set any register by entering its name followed by an
expression containing its new value.
Examples: "AX=BX+CX" sets register AX. "ES=DS" sets
register ES. "EAX=EBX+CX" sets register EAX.
Disassembly/Memory L1-L9, M1-M6
Creates a disassembly or memory window (whichever is the
primary window) on one of the window area lines.
Windowing NW (key F4)
Toggles among disassembly, memory, LDT/GDT, IDT, and page
windows.
Get Help HP (key F1)
Displays a single help screen that serves as a quick
reference sheet for the ASDT32 commands.
Return to OS/2 TP (key F3)
In protected mode, TP is valid only for processes that are
not running at level 0. For those processes that are
running at level 0, you need to execute (EX) to completion
to return to OS/2. If ASDT32 has intercepted code
running in virtual 8086 mode, you should use the TP
command only to terminate an application (not a device
driver, a resident interrupt handler, etc.).
See Entering ASDT32 Commands for a discussion of ASDT32 command line handling.
See Window Area for a discussion of ASDT32 window editing.
ΓòÉΓòÉΓòÉ 2.4. Function Keys ΓòÉΓòÉΓòÉ
ASDT32 sets function keys F1-F10 for you. You can change them to other valid
ASDT32 commands, and you can also set the shifted, controlled, and alternate
function keys. The default keys are:
F1 Help (HP)
F2 Define Keys (DK)
F3 Terminate Process (TP)
F4 Next Window (NW)
F5 Repeat Find (FX)
F6 Application Screen (SC)
F7 Execute User Program (EX)
F8 Single Step User Program (ST)
F9 Procedure Step User Program using S9 (S9=EX+IL;EX;S9)
F10 Retrieve Command (RC)
ΓòÉΓòÉΓòÉ 3. Using the ASDT32 Display ΓòÉΓòÉΓòÉ
The ASDT32 display has the following areas:
Line 1 The first three breakpoint variables (S1-S3), the process id,
the EAX register, and the first stack location (word or double
word depending on whether SS points to a 16- or 32-bit data
area).
Line 2 The second three breakpoint variables (S4-S6), the thread id,
the EBX register, and the second stack location.
Line 3 The last three breakpoint variables (S7-S9), the task
register, the ECX register, and the third stack location.
Line 4 The code origin, the location counter, the LDT register, the
EDX register, and the fourth stack location.
Line 5 the EBP register, the step count, the FS and GS registers, the
ASDT32 screen number (D1-D9), and the eflags register.
Line 6 The SS, CS, DS, and ES registers and the eflags register
expanded as individual bits.
Line 7 The ESP, EIP, ESI, and EDI registers.
Line 8 The name of the window (for lines 11-25), the address of the
next instruction (linear value) and its disassembly, and the
operand address and contents.
Line 9 The command line.
Line 10 The message line.
Lines 11-25 The window area containing line numbers and a view of
disassembly, memory, LDT/GDT or IDT descriptor entries, or
page directory or page table entries.
A disassembly line is divided into three editable sections: the selector and
offset parts of the address (or the linear or physical address), the
hexadecimal instruction (note that the text of the instruction is shown as the
default. If you want to see the instruction as hex, enter the disassembly
window and toggle the line(s) for a given segment from text by using the
insert key. See Window Contents for more details), and the instruction's
operand value. In addition, ASDT32 displays the instruction mnemonic and the
operand address.
A memory line is divided into three editable sections: the selector and
offset parts of the address (or the linear or physical address), the
hexadecimal memory, and the equivalent ASCII/EBCDIC characters.
An LDT, GDT, or IDT line is divided into these sections: an index into the
descriptor table, the type of descriptor, and other information based on the
type of descriptor. LDT, GDT, and IDT lines are not editable.
A page directory or page table entry line is divided into these sections: a
linear address that is used to determine which directory or table entry to
display, the physical frame for the entry, and additional entry (such as the
dirty bit status) information. A page directory or page table entry line is
not editable.
You can move the cursor anywhere on the command line and can move it off the
command line to the disassembly or memory window area. You use the command
line to enter ASDT32 commands and the window area to view or edit
instructions, memory, and descriptors. Subsequent sections discuss how to
enter ASDT32 commands, how to move the cursor within the disassembly or memory
window, and how to alter instructions or memory.
ΓòÉΓòÉΓòÉ 3.1. Memory Format ΓòÉΓòÉΓòÉ
On lines above the command line, ASDT32 displays memory in register format;
i.e., it is not byte-reversed. ASDT32 also uses this format for the operand
values at the right edge of disassembly lines below the command line. On memory
lines below the command line, memory is displayed in Intel byte-reversed
format.
ΓòÉΓòÉΓòÉ 4. Sample ASDT32 Session ΓòÉΓòÉΓòÉ
This section shows a sample debug session that uses several groups of ASDT32
commands. An OS/2 device driver, SAMPLEDD.SYS, and an OS/2 program, SAMPLE.EXE,
are used for this purpose. The source and binaries for SAMPLEDD.SYS and
SAMPLE.EXE are available in the ASDT32 PACKAGE.
This sample debugging session is designed to demonstrate some of the features
of ASDT32 and assumes the default ASDT32 function keys are set. See Hints for
Using ASDT32 for additional information.
A lot of software debugging involves executing or stepping through the program
in question and looking at registers or output for correctness. Often,
incorrect memory or registers are changed while debugging and are later
corrected in the source code as a result of the debugging session. This session
will show some of these typical debugging actions and some of the features and
functions of ASDT32.
In preparation for the debug session, create a subdirectory on your C: drive
and ensure that ASDT32.PRO, SAMPLEDD.SYS, SAMPLEDD.SYM, and SAMPLE.EXE are
placed there. We'll assume that you called your subdirectory ASDT32.
Ensure that the following lines are in your CONFIG.SYS file:
DEVICE=ASDT32.SYS C:\ASDT32\ASDT32.PRO C:\ASDT32\SAMPLEDD.SYM
DEVICE=ASDT322.SYS
DEVICE=C:\ASDT32\SAMPLEDD.SYS
It is important that ASDT32 be described in your CONFIG.SYS before
SAMPLEDD.SYS. Note that you must reboot OS/2 3.0 after you have modified your
CONFIG.SYS for the above changes to take effect.
When OS/2 3.0 boots, ASDT32 will gain control when SAMPLEDD.SYS is being
initialized. This is because a breakpoint (INT 3) was hard coded at the
beginning of the device driver's strategy routine. At this point, the ASDT32
display is shown, and the sample session begins.
1. Type DK and press the enter key.
This displays the current settings of all 40 ASDT32 function keys. ASDT32
displays 20 keys on each of two screens.
Press any key to view the second of the two DK screens.
Press any key to view the ASDT32 display screen.
2. Type EP and press the enter key.
This command causes ASDT32 to execute the profile that you specified in
CONFIG.SYS; that is, ASDT32.PRO.
There are 3 commands in ASDT32.PRO. Two qualify the device driver's code
and data segment for symbol resolution, and the other command tells
ASDT32 to use Intel (MASM) mnemonics in its disassembly.
If you prefer AL86 mnemonics, type DA and press the enter key to switch back.
AL86 mnemonics are the default shown upon entry to ASDT32.
3. Press the down arrow key to move into the disassembly window. Next press
the insert key such that the text of the instructions in the disassembly
window is toggled to hex. Now press the tab key twice until the cursor
reaches the 'CC'x field. Type '90'x over this field.
Now press the insert key again. Notice that you changed the INT 3
instruction to a NOP! This means that ASDT32 will not gain control at the
beginning of the Strategy routine when next you enter ASDT32.
4. Press F4.
This changes the primary window to memory. The window mode is shown on
the eighth line of the ASDT32 screen. The memory window shows a maximum
of 15*16 bytes of data.
5. Press F4.
This changes the primary window to LDT/GDT. The LDT/GDT window allows you
to view descriptors in the LDT and in the GDT.
6. Type L1 CS; L2 DS; L3 SS and press the enter key.
This allows you to look at your code, data, and stack descriptors. Note
that your stack descriptor is in the LDT!
7. Press F4.
This changes the primary window to IDT. The IDT window allows you to view
descriptors in the IDT. Note that some of the descriptors "belong" to
OS/2 and others to ASDT32.
8. Press F4.
This changes the primary window to PTE. The PTE window allows you to view
page table entries.
9. Type L1 CS:EIP~ and press the enter key.
This allows you to look at the page table entry that describes
SAMPLEDD.SYS.
10. Type PW D and press the enter key.
This allows you to look at the page directory entry that describes
SAMPLEDD.SYS.
11. Press F4.
This changes the primary window back to disassembly.
12. Type MW M1 and press the enter key.
This allows you to have a secondary window for memory display in the
disassembly window.
13. Type M1 @rp and press the enter key.
Your secondary memory window now addresses the storage area where
SAMPLEDD.SYS saves the pointer to the request packet that is given to the
device driver by OS/2.
You can step instructions with ASDT32, which uses the count field to determine
how many instructions to step per iteration. You can alter the count field at
any time. See CT - Step Count for further information.
14. Press F8 three times.
This steps the device driver instructions for three instructions. Note
that SAMPLEDD.SYS's rp memory area now holds the request packet pointer.
Further note that the Ct (count) field is displayed with reverse-video
attributes to indicate that you have returned from the step operation.
15. Type M1 M1%4 and press the enter key.
Now the secondary memory window addresses your request packet! The "%"
operator allows you to use indirect addressing in your ASDT32 command
line expressions. See Indirect Addressing for further information.
The S breakpoints, named S1 through S9, are the primary breakpoints. When set,
they are turned on (activated) and will stop program execution if encountered.
The V breakpoints, named V1 through V9, are secondary breakpoints. They double
as scratch pad variables since they are not activated when set but remain off
until specifically turned on.
See Setting Breakpoints and Display Screens and Breakpoints for further
information.
16. Type S1 @Init and press the enter key.
You have set a breakpoint at the start of the initialization routine for
SAMPLEDD.SYS. Note that S1 is highlighted with the breakpoint
information (in this case, the symbol name Init) and that the ASDT32
message line has the disassembly for the instruction at that location (in
this case, a load of the AX register).
17. Press F7.
You have asked ASDT32 to return execution of SAMPLEDD.SYS to OS/2. Note
that you regain control at the Init location. Also note that S1 is
displayed with reverse-video attributes to indicate that this breakpoint
was hit.
18. Press F4 and then type L5 @InitMsg and press the enter key.
19. Next press the down arrow key until the cursor reaches the L5 line.
Press the tab key until the cursor reaches the character display for the
L5 line. Press the right arrow key twice. The cursor should be on the
character "S" of the word "SAMPLEDD" in the character display.
20. Now type the characters "GARBAGE " over the "SAMPLEDD" characters.
You have now modified SAMPLEDD.SYS's data storage.
21. Now press the home key.
This returns the cursor to the ASDT32 command line.
22. Type DW and press the enter key.
This restores the disassembly window.
23. Type M1 and press the enter key.
This removes the secondary memory window.
24. Type S2 M3 and press the enter key.
You have set a breakpoint at the first instruction after the
initialization routine has called the DosWrite API.
25. Press F7 to execute SAMPLEDD.SYS until the next breakpoint occurs.
26. Press F6 when ASDT32 regains control.
ASDT32 shows you your display screen. Note your "GARBAGE " handiwork!
Press any key to restore the ASDT32 display screen.
27. Type S3 @Control and press the enter key.
You have set a breakpoint at the point where SAMPLEDD.SYS handles IOCTL
requests.
28. Press F7 to execute SAMPLEDD.SYS so that it can finish its
initialization.
In whatever manner you choose, invoke SAMPLE.EXE.
SAMPLE.EXE makes a DosDevIOCtl call to SAMPLEDD.SYS. This causes ASDT32 to
get control at the Control location within SAMPLEDD.SYS.
29. Once the ASDT32 screen is again displayed, press F1.
This replaces the ASDT32 display with a help screen containing a logical
list of ASDT32 commands in case you forget an ASDT32 command name.
Press any key to restore the ASDT32 display screen.
30. Now type PI and press the enter key.
This is the program identification command, and it causes ASDT32 to
display the invocation path for the current thread. The path is
displayed on ASDT32's message line, and you can see this is useful in
determining what program issued the IOCTL request.
31. Press F7 to execute SAMPLEDD.SYS so that ASDT32 can gain control at the
Control location again.
32. Type S4 M2 and press the enter key after ASDT32 regains control.
33. Press F7 to execute SAMPLEDD.SYS up to the DevHlp call instruction.
In general, you may wish to run an entire subroutine, interrupt, or repeated
instruction and stop as soon as it completes its task. ASDT32 allows you to do
this with an easy sequence of commands, which ASDT32 has already defined to be
function key F9.
Since the next instruction is a call, you can try this now.
34. Press F9.
This causes the commands associated with key F9 to be executed
immediately. This is equivalent to entering S9=EX+IL;EX;S9.
These commands set a breakpoint at the instruction following the CALL
instruction, execute the call, and remove the breakpoint. This technique
is a convenient way to do procedure stepping since it can be used for
INT, CALL, and REP instructions.
35. Now press F7 to allow SAMPLEDD.SYS to finish processing the IOCTL
request. Note that SAMPLE.EXE causes ASDT32 to regain control via an
assembler routine that issues an INT 3.
36. Press F8 twice to complete the assembler routine and to have ASDT32
display the next instruction in SAMPLE.EXE.
At any time, you can retrieve the last ten ASDT32 command lines you entered
since they are saved by ASDT32. Commands entered with function keys or from a
file are not saved.
37. Enter RC or press F10.
ASDT32 displays the last command you entered on the command line. You may
continue to retrieve commands by pressing F10 and may reenter any of
these commands by pressing the enter key.
38. Enter TP or press F3.
ASDT32 terminates SAMPLE.EXE and returns to OS/2.
You have now finished this sample debugging session. This sample session has
shown you most of the predefined function keys as well as some other ASDT32
commands. Although you have seen only a subset of the available ASDT32
commands, you can now experiment with all of the ASDT32 commands, which are
described in ASDT32 Command Reference.
ΓòÉΓòÉΓòÉ 5. Entering ASDT32 Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1. Command Line Input ΓòÉΓòÉΓòÉ
You use the command line for entering all of the ASDT32 commands. When you
press the ENTER key, ASDT32 processes the command line. Command processing
begins with the first command on the command line and continues with the
remaining commands. You separate commands with semicolons. Command line
processing also stops when ASDT32 encounters an invalid command.
When command line processing finishes, the cursor moves to the beginning of the
command line. The command line is cleared unless the first character of the
command line is a slash (/) or unless an error was encountered. The sole
function of the slash at the beginning of the command line is to preserve the
command line so you can see and use it again.
You can place as many commands on the command line as will physically fit. You
can place one or more blanks before or after each command. There is no
restriction on the sequence or combinations of commands.
ΓòÉΓòÉΓòÉ 5.2. Profile Input ΓòÉΓòÉΓòÉ
An alternative to typing ASDT32 commands on the command line is reading them in
from a profile on disk. This profile, which you can create with any standard
editor, is read in at ASDT32 installation time. Its commands are executed with
the Execute Profile (EP) command (see EP - Execute Profile).
All commands in the profile must follow standard ASDT32 command rules; that is,
they are processed as if they had been entered on the command line. They must
fit on the command line, which is 76 characters in length. A slash at the
beginning of a line in a file is ignored.
The following discussion of command handling applies to the command line and to
profiles.
ΓòÉΓòÉΓòÉ 5.3. Command Parsing ΓòÉΓòÉΓòÉ
The command line format is as follows:
[/] cmd = opnd [ ; cmd = opnd ; cmd = opnd ; . . . ]
If the optional slash at the beginning is present, ASDT32 will not erase the
command line when it finishes processing the commands. If you wish to enter
more than one command on the command line at a time, separate the commands with
semicolons.
Commands are usually 2 characters in length. However, to facilitate the 80386
registers, a few commands (such as EAX) are 3 characters in length. You can
follow the last command with a semicolon. This trailing semicolon does not
affect command line processing. However, it allows you to use the Tab key to
position the cursor after the last command if you wish to add another command.
The blanks as well as the "=" sign between the "cmd" and the "opnd" are
optional. This condensed syntax is not elegant, but you can save unnecessary
keystrokes by using it:
cmdopnd;cmdopnd;cmdopnd; . . .
ΓòÉΓòÉΓòÉ 5.4. Specifying Operands ΓòÉΓòÉΓòÉ
An operand begins with the first non-blank (other than =) following the command
and continues to a semicolon or continuous blank characters. If there are only
blanks following the command, the operand is null.
ΓòÉΓòÉΓòÉ 5.4.1. Expression Evaluation ΓòÉΓòÉΓòÉ
Most operands are expressions. An expression is one or more terms which are
added together (default) or operated upon with the ASDT32 expression operators.
A term may be a decimal or hexadecimal number, one of the processor registers,
or one of the ASDT32 variables.
The ASDT32 variables include the breakpoints V1-V9 and S1-S9 (V1-V9 are no
longer displayed at the top of the ASDT32 screen. See CB - Complex Breakpoint
for details on how to view your V1-V9 variables), the memory address variables
L1-L9 and M1-M6, and the other variables M7-M9 (that are not displayed). These
other variables can be used as scratch pad space for expression or address
calculations. See Valid Terms for a complete list of ASDT32 variables.
The "+" and "-" signs may precede terms. The optional "+" sign performs no
additional function but can improve operand readability. The "-" sign negates
the term before the addition is performed. You can precede a term with multiple
signs, and you can use blanks freely between terms and their signs.
Terms which are processor registers or ASDT32 variables are usually 2
characters in length. However, some ASDT32 variables (such as ESI) are 3
characters in length. Decimal and hexadecimal terms have variable length. A
blank, sign, special operator, or another term must follow a numeric term to
delimit that numeric term; there is no such requirement for register or
variable terms.
Decimal terms are distinguished from hexadecimal terms by a trailing decimal
point. Physical addresses are distinguished from linear addresses by a trailing
"!." Indirect terms are distinguished from other terms by a trailing "%"
character and optional length.
Indirect terms allow you to use the contents of a memory location indirectly.
When you specify an indirect address, ASDT32 uses the location contents for the
number of bytes you specify.
All calculation results are displayed in hexadecimal format. Decimals,
hexadecimals, registers, and variables are all converted to hexadecimal format
for calculation.
Symbols are distinguished from other ASDT32 variables and terms by having "@"
precede them. A symbol will be resolved (if found) to a selector:offset
address.
ΓòÉΓòÉΓòÉ 5.4.2. Expression Examples ΓòÉΓòÉΓòÉ
The following examples portray several different ASDT32 commands with various
operand expressions and terms.
CO = CS:04E8 assign CS and offset 04E8 to CO
CO = CS:3BF12A07 assign CS and offset 3BF12A07 to CO
V1 = 10. + 20. + 44. decimal arithmetic
M7 = EAX + 4A23 - 10. combined arithmetic
S1 = CO:13 set breakpoint at CO + 13
AX = ES:BX%6%2 set AX to contents of memory pointed to by a
6-byte pointer, which is pointed to by ES:BX
ΓòÉΓòÉΓòÉ 5.4.3. Expression Syntax ΓòÉΓòÉΓòÉ
In the following equivalent examples, the ASDT32 variable V1, the negative
value of processor register BX, hexadecimal 4A, and the processor register AX
are added together with the result being placed into the AX processor register.
AX = V1 - BX + 4A + AX optimum readability
AX=V1-BX+4A+AX optional blanks removed
AX V1-BX 4A AX optional "=" and "+" removed
AXV1-BX4A AX fewest keystrokes
ΓòÉΓòÉΓòÉ 5.4.4. Valid Terms ΓòÉΓòÉΓòÉ
The following list shows all of the valid processor register and ASDT32
variable terms which you can use in an expression. Hexadecimal, decimal, and
indirect terms are also valid. AH AL AX BH BL BP BX CH CL CO CR0 CR2 CR3 CS CT
CX DH DI DL DS DX EAX EBP EBX EC ECX EDI EDX EFL EIP ES ESI ESP EX FL FS FX GD
GS ID IL IP LC LD L1-L9 M1-M9 OP SI SP SS S1-S9 TS V1-V9 XS
It is useful to remember that all registers and variables displayed on the
screen (except the binary flag bits, the process id, and the thread id) are
valid terms for an expression. All registers and variables displayed on the
screen including the binary flag bits are valid ASDT32 commands.
Most commands are also the name of a variable (e.g., AX, DS, or L1). When one
of these commands is used, there is an assignment to the variable. For example,
the command AX=BX+123 assigns the value BX+123 to AX. It is important to
remember that AX is the command because in some cases the assignment causes
other results. For example, S1=DS:BX+123 causes ASDT32 to assign the value
DS:BX+123 to S1 and activates the breakpoint S1.
Some ASDT32 variables are not commands. They are the CR0, CR2, CR3, EC, GD,
ID, IL, and OP variables. The CR0, CR2, and CR3 variables allow you to examine
the contents of the respective 80386 control registers. The EC variable is the
error code that is returned by OS/2 when a general protection fault occurs.
ASDT32 initializes EC to 0, and EC changes value with each INT '0D'x. The GD
and ID variables allow you to use the base address of the GDT and the IDT in
linear address expressions. The IL variable holds the current instruction's
length in bytes while the OP variable has the address of the byte/word/dword
referenced by the current instruction (if any). The OP address may be
substituted with a symbol name if ASDT32 finds a symbol that was read in which
corresponds.
ΓòÉΓòÉΓòÉ 5.4.5. Address Evaluation ΓòÉΓòÉΓòÉ
ASDT32 expects addresses to be in one of three forms: selector:offset, linear
address, or physical address. If the address expression contains a colon (:), a
selector register (CS, DS, ES, FS, GS, SS, or XS), or an ASDT32 variable that
is in selector:offset form, then ASDT32 assumes the address is in
selector:offset form. The resulting expression is valid for reading/writing
memory only if the selector references a valid descriptor, the offset falls
within the segment limit for that descriptor, and the generated linear address
has a present page mapping.
If the address expression is not in selector:offset form, then ASDT32 assumes
that it is a linear address. In this case, the expression is valid for
reading/writing memory only if OS/2 3.0 has set up a page mapping the linear
address and that page is present. If the address expression is delimited with
"!," ASDT32 will interpret it as a physical address. These expressions are
always valid for reading/writing memory.
Note: In virtual 8086 mode, the address evaluation expected is either a
segment:offset, a linear address, or a physical address. In the case of
segment:offset addresses, all segments are considered valid for reading/writing
memory although the page mapping restrictions that are in effect for
protected-mode addresses apply.
When ASDT32 has stopped a process that is in virtual 8086 mode, you can still
have it interpret segment:offset as a protected-mode selector:offset by
delimiting the expression with "#." In this case, you need to ensure that the
selector references a valid descriptor. Reciprocally, when ASDT32 has stopped a
protected-mode process, you can have it interpret segment:offset as a "DOS"
calculation by delimiting the expression with "&"
When you use the "#" and "&" symbols in this manner, realize that the resulting
linear address reflects the currently defined (page-mapped) space.
ΓòÉΓòÉΓòÉ 5.5. Moving on the Command Line ΓòÉΓòÉΓòÉ
ASDT32 recognizes the following function keys on the command line:
Enter Moves the cursor to the beginning of the command line and
executes the commands on the command line.
Home Moves the cursor to the beginning of the command line.
End Moves the cursor to the end of text on the command line.
Up Arrow Moves the cursor to the first line of the edit area (valid
only in a disassembly or memory window).
Down Arrow Moves the cursor to the first line of the edit area (valid
only in a disassembly or memory window).
Left Arrow Moves the cursor left one position unless the cursor is at the
beginning of the command line.
Right Arrow Moves the cursor right one position unless the cursor is at
the end of the command line.
PgUp Scrolls the first window segment up the number of lines in
that segment (valid only in an LDT/GDT, IDT, or page window).
PgDn Scrolls the first window segment down the number of lines in
that segment (valid only in an LDT/GDT, IDT, or page window).
Ctrl-PgUp Scrolls the first window segment up one line in that segment
(valid only in an LDT/GDT, IDT, or page window).
Ctrl-PgDn Scrolls the first window segment down one line in that segment
(valid only in an LDT/GDT, IDT, or page window).
Tab Moves the cursor to the next command on the command line and
wraps around from the last command to the first command.
Back Tab Moves the cursor to the previous command on the command line
and wraps around from the first command to the last command.
Spacebar Replaces the character at the cursor position with a blank and
moves the cursor right one position.
Backspace Moves the cursor left one position, erases the character at
the new cursor position, and moves the remainder of the
command line left one position.
Insert Changes the insert mode. A caret at the beginning of the
command line indicates that insert mode is active.
Del Erases the character at the cursor and moves the remainder of
the command line left one position.
Shift Shifts to upper case and reverses the effect of Caps Lock.
Caps Lock Shifts to upper case for the alphabetic keys.
Ctrl-Home (Clear) erases the entire command line and places the cursor
at the beginning of the command line.
Ctrl-End (Clear End-of-Line) erases the command line beginning at the
cursor position continuing to the end of the command line.
PrtSc Causes the ASDT32 screen to be printed.
ASDT32 recognizes the following function keys while the user program is
executing:
PrtSc Interrupts (as the default hot key) the user program if the /K
option was specified or the SK command was issued prior to
executing the user program.
Note: ASDT32 assumes that you want to print your screen when
you press the shift key at the same time that you press the
PrtSc key. On some hardware configurations, you need to press
the shift key a full second or two before pressing the PrtSc
key to have ASDT32 ignore the keystrokes and allow OS/2 to
print your screen.
If you want, you can define the hot key to be any scan code
that you desire with the /K=nn option or the SK nn command.
ΓòÉΓòÉΓòÉ 6. Window Area ΓòÉΓòÉΓòÉ
The window area occupies the bottom portion of the ASDT32 display. This area is
where you view disassembled instructions, memory, LDT/GDT or IDT descriptors,
or page directory or page table entries. You can access the window area through
window commands, individual window line commands, and direct editing in the
window itself.
The window consists of fifteen lines. Each line has a line identifier that is
used to address the lines with commands. These identifiers are the ASDT32
variables L1 through L9 and M1 through M6. Each window line displays its
identifier at the beginning of the line. You can address any window line in any
window with the L1-L9 and M1-M6 commands.
There is always a primary window. The primary window is the type of line that
is displayed on line L1, the first line in the window display area of ASDT32.
Initially, the primary window is disassembly. The primary window can be
disassembly, memory, LDT/GDT, IDT, or page. This is indicated on line 8 of the
ASDT32 display.
You can set up a secondary window for disassembly and memory windows. If the
primary window is disassembly, then the secondary window must be memory. If
the primary window is memory, then the secondary window must be disassembly.
You can divide all primary windows into multiple window segments. Every primary
window line shows an asterisk near the front of the line when that line starts
a window segment. Multiple window segments allow you to view more than one
disassembly, memory, LDT/GDT, IDT, or page address at once.
You can set up the window area in any of the following configurations:
Window Type Contents Segments Browse Edit
Disassembly 15 disassembly lines 1-15 Yes Yes
Memory 15 memory lines 1-15 Yes Yes
Disasm/Memory 15 disasm/memory lines 1-14,1 Yes Yes
Memory/Disasm 15 memory/disasm lines 1-14,1 Yes Yes
LDT/GDT 15 LDT/GDT lines 1-15 Yes No
IDT 15 IDT lines 1-15 Yes No
Page 15 page lines 1-15 Yes No
ΓòÉΓòÉΓòÉ 6.1. Window Contents ΓòÉΓòÉΓòÉ
The disassembly window area shows portions of memory as hexadecimal
instructions and disassembled mnemonics for those instructions. A disassembly
window consists of one to fifteen lines showing a contiguous block of
disassembled instructions. Each disassembly line shows an address (either
selector:offset or 8-higit linear or physical), the hexadecimal instruction or
its AL86 or Intel (MASM) text, an operand address, and operand contents
(byte/word/dword) if appropriate.
Note: The text of the instruction is shown as the default. If you want to see
the instruction as hex, enter the disassembly window and toggle the line(s) for
a given segment from text by using the insert key.
Within a disassembly window you may alter and scroll through instructions. You
can switch the mnemonic format with the DA (Disassemble AL86) and DM
(Disassemble MASM) commands. Also, if the disassembly line is in the range of
the code origin (CO), ASDT32 displays "$" near the front of the line and
displays the disassembly line address as :offset, where the offset is from the
CO. This allows you to display a disassembly segment that matches your assembly
listing.
The memory window area shows portions of memory. A memory window consists of
one to fifteen memory lines showing a contiguous block of memory. Each memory
line shows an address (either selector:offset or 8-higit linear or physical),
sixteen bytes (one paragraph) of memory in hexadecimal format, and the same
sixteen bytes in either ASCII or EBCDIC format. You can switch the format with
the AS (ASCII) and EB (EBCDIC) commands. Within a memory window you may alter
and scroll through memory.
In both the disassembly and memory windows, ASDT32 may substitute a symbol name
for a given line address. This assumes that the line address corresponds to
some symbol read in. Note that code origin usage will override this
substitution process; i.e., if "$" is present on a disassembly line, ASDT32
will not substitute the offset address with a symbol name.
This substitution process extends to the operand address when possible. The
symbol name replacement for an operand address is not overridden by code origin
usage.
The LDT/GDT window area shows LDT and GDT descriptors. Each LDT/GDT line shows
the table index, the descriptor type, and other descriptor information based on
the descriptor type. Likewise, the IDT window area shows IDT descriptors.
The page window area shows page directory or page table entries. Each
directory or table entry line shows the linear address that is used to
determine which entry to display, the physical frame for the entry, and
additional entry (such as the dirty bit status) information.
Within an LDT/GDT, IDT, or page window, you may scroll through descriptor
table, page directory, or page table entries. These windows are browsing
windows and do not allow you to edit the entries.
ΓòÉΓòÉΓòÉ 6.2. Moving Among Windows ΓòÉΓòÉΓòÉ
A set of ASDT32 commands is available to move among all of the ASDT32 windows.
Moving among the different windows changes the primary window. The name of the
primary window is displayed at the beginning of line 8 on the ASDT32 screen.
Use the following commands to switch windows: MW (switch to memory), LW (switch
to LDT/GDT), VW (switch to IDT), PW (switch to page), and DW (switch to
disassembly). To toggle among the windows, use the NW (Next Window) command or
press the F4 key. On entry, the primary window is disassembly.
ΓòÉΓòÉΓòÉ 6.3. Moving in the Disassembly and Memory Windows ΓòÉΓòÉΓòÉ
The disassembly and memory windows are edit windows. ASDT32 recognizes commands
on the command line and the following function keys while editing these window
areas:
Enter Moves the cursor to the beginning of the command line and
executes the commands on the command line.
Home Moves the cursor to the beginning of the command line but
does not execute the commands on the command line.
Up Arrow Moves the cursor up one line. When the cursor reaches the
top of the window, it wraps around to the bottom line.
Down Arrow Moves the cursor down one line. When the cursor reaches the
bottom of the window, it wraps around to the top line.
Left Arrow Moves the cursor left to the next position where ASDT32
accepts keystrokes. When the cursor reaches the beginning of
a line, it wraps to the end of the previous line.
Right Arrow Moves the cursor right to the next position where ASDT32
accepts keystrokes. When the cursor reaches the end of a
line, it wraps to the beginning of the next line.
Ctrl-Left Arrow Scrolls the window up one byte.
Ctrl-Right Arrow Scrolls the window down one byte.
PgUp Scrolls the window up the number of lines in the segment.
PgDn Scrolls the window down the number of lines in the segment.
Ctrl-PgUp Scrolls the window up one line.
Ctrl-PgDn Scrolls the window down one line.
Tab Moves the cursor right to the next column. The cursor wraps
as it does with the Right Arrow.
Back Tab Moves the cursor left to the previous column. The cursor
wraps as it does with the Left Arrow.
Spacebar Functions similarly to the Right Arrow except that the
Spacebar is a valid data key when entering character data.
Backspace Functions similarly to the Left Arrow.
Del Deletes the window in which the cursor is located and
combines it with the previous window. If only one window
exists, no action is taken.
Ins In the disassembly window, toggles the line display between
the text of and the hex for that line's instruction. The
line's address and operand information (if any) are always
displayed. In the memory window, no action is taken.
Shift Shifts to upper case and reverses the effect of Caps Lock.
Caps Lock Shifts to upper case for the alphabetic keys.
Ctrl-Home Moves the cursor to the beginning of the command line and
erases the entire command line.
PrtSc Causes the ASDT32 screen to be printed.
The LDT/GDT, IDT, and page windows are browse windows. ASDT32 recognizes
commands on the command line and the command line function keys while browsing
these window areas. See Moving on the Command Line for a list of these keys.
When the window area is being used by the Compare Memory (CM) function, a
different set of function keys is available. See CM - Compare Memory for
details.
ΓòÉΓòÉΓòÉ 6.4. Altering Disassembly and Memory ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.4.1. Creating Windows ΓòÉΓòÉΓòÉ
A new window is created by entering a new address for the desired line. This is
done by typing over the old address or by entering one of the L1-M6 commands on
the command line. ASDT32 defines that line as the first line of a disassembly
or memory window. ASDT32 displays an asterisk at the left of the address to
indicate that the line begins a new window. The end of any window is determined
by the first line of the following window.
A secondary window segment is created by entering an MW or DW command on the
command line if you are in a disassembly or memory window mode. For example, to
create a memory window segment in the disassembly window at line L8, enter
"MW L8" on the command line. To create a disassembly window segment in the
memory window at line M2, enter "DW M2" on the command line. You are limited to
only one secondary window for a given primary window.
ΓòÉΓòÉΓòÉ 6.4.2. Altering Data within a Window ΓòÉΓòÉΓòÉ
You can alter disassembled instructions with hexadecimal input. To do this,
move the cursor to the appropriate byte in the hex area for the instruction
itself or for the referenced operand (if there is one and the reference is
valid) area and type over the data that is displayed.
Note: The text and the hex of the instruction are not displayed simultaneously
for a given line. You can use the Ins key to toggle between these two methods
of display for a disassembly window segment. The cursor must be located in the
segment that you wish to toggle.
When in the instruction's hex field, each keystroke results in a modification
of the instruction; that is, ASDT32 updates the instruction as each higit is
entered. When in the instruction's referenced operand field, each keystroke
results in a modification of that memory location. However, please note that
ASDT32 arranges the referenced operand as it would appear in a processor
register (ASDT32 undoes the byte reversal).
You can alter memory with hexadecimal or character input. To do this, move the
cursor to the appropriate byte in either the hex or the character area and type
over the data that is displayed. Each keystroke results in a modification of
memory; that is, one nibble is modified for each higit entered, and one full
byte is modified for each character entered in the character area.
ASDT32 updates a window area line under any of the following conditions:
The cursor is on the window line.
A command (or command series) is executed.
To prevent unintentional data alteration, ASDT32 will not move the cursor from
the address area to the hexadecimal area when a character key is pressed. Use
one of the cursor keys or the space bar to move the cursor into the
hexadecimal display area from the address area.
ΓòÉΓòÉΓòÉ 6.4.3. Deleting a Window ΓòÉΓòÉΓòÉ
Delete a disassembly or memory window and combine it with the previous window
by pressing the Del key with the cursor anywhere in the secondary window or by
entering the appropriate L1-M6 command without a parameter.
When the primary window is disassembly, the DW command deletes the memory
window segment if present. When the primary window is memory, the MW command
deletes the disassembly window segment if present.
ΓòÉΓòÉΓòÉ 7. Setting Breakpoints ΓòÉΓòÉΓòÉ
ASDT32 provides permanent, complex, and procedure step breakpoints. For each of
the nine ASDT32 display screens, you can have up to eighteen permanent or
complex breakpoints or up to seventeen permanent or complex breakpoints and one
procedure step breakpoint.
ΓòÉΓòÉΓòÉ 7.1. Permanent Breakpoints ΓòÉΓòÉΓòÉ
The permanent breakpoints are divided into primary and secondary groups. The
primary group is named S1 through S9, and the secondary group is named V1
through V9. The difference between the S group and the V group is that the S
breakpoints default to an "on" or active condition when set, and the V
breakpoints default to an "off" or inactive condition when set. V breakpoints
must be specifically turned on to become active.
Note: The V1-V9 variables are no longer displayed at the top of the ASDT32
screen. See CB - Complex Breakpoint for details on how to view your V1-V9
variables.
The breakpoints are divided this way to give you visible breakpoints and extra
scratch pad space, which can double as additional breakpoints when needed.
Since nine active breakpoints are usually enough for a given debug session, the
nine inactive breakpoints serve as scratch pad variables to hold intermediate
calculations or base addresses. Usually, you will use V1-V9 as scratch pad
variables and S1-S9 as breakpoints. However, if you need more breakpoints per
screen, you can turn any of the V variables on so that it becomes an active
breakpoint.
ΓòÉΓòÉΓòÉ 7.2. Procedure Stepping ΓòÉΓòÉΓòÉ
ASDT32 provides a single temporary breakpoint which is used as a procedure step
or module step facility. This function is provided in a function key (F9 by
default) because it consists of several ASDT32 commands. The procedure step is
performed by setting a breakpoint at the instruction following the current
instruction, executing, and then removing the breakpoint.
You will use the procedure step most frequently for CALL, INT, and REP
instructions. If you are stepping through your program and you reach one of
these instructions, the procedure step command sequence "S9=EX+IL;EX;S9" will
execute the subroutine or block of code and stop at the instruction following
the CALL, INT, or REP instruction. This uses breakpoint S9 as a substitute for
an automatic module step function.
If you plan to use the built-in procedure step function, you should not set a
breakpoint in S9 since it will be replaced by the procedure step breakpoint. Of
course, you can set other breakpoints as procedure step breakpoints yourself by
issuing the appropriate commands.
ΓòÉΓòÉΓòÉ 7.3. Breakpoint Addresses ΓòÉΓòÉΓòÉ
ASDT32 supports four types of addressing schemes for breakpoint setting. A
breakpoint can be either an 8-higit linear, an 8-higit physical, a
selector:offset address, or a segment:offset address for virtual 8086 mode
applications. ASDT32 displays breakpoints in a relative address format whenever
possible. If the breakpoint address is not more than 4K greater than the active
code origin (CO) address, ASDT32 displays the breakpoint as an offset preceded
by "$." Otherwise, if the same condition is true for CS, ASDT32 displays the
breakpoint as an offset preceded by "+."
If ASDT32 can not display a selector:offset breakpoint address as an offset of
either the CO or the CS, then ASDT32 displays this breakpoint as an offset
preceded by "#" for protected-mode virtual addresses or "&" for virtual 8086
mode addresses.
Physical addresses that can not be displayed as an offset of the CO or the CS
are preceded by "!" whereas linear addresses that fall into this category are
preceded by a blank. Null breakpoints are displayed as "........."
For a virtual address breakpoint, ASDT32 may substitute a symbol name in the
breakpoint's display area. This assumes that the breakpoint address corresponds
to some symbol read in. Note that code origin usage will override this
substitution process; i.e., if "$" is present in the breakpoint display area,
ASDT32 will not substitute the offset address with a symbol name.
ΓòÉΓòÉΓòÉ 7.4. Complex Breakpoints ΓòÉΓòÉΓòÉ
You can change any active ASDT32 breakpoint to a complex breakpoint with the CB
command. Complex breakpoints have an optional condition and an optional count.
You will use complex breakpoints most often to stop when your program meets a
particular condition or when it executes the nth occurrence of a particular
instruction. Counts are also useful inside loops.
You can have both complex breakpoints and regular breakpoints set at the same
time. For each complex breakpoint, ASDT32 takes the breakpoint only when its
condition and count satisfy the requirements. Otherwise, it returns control to
your program for further execution.
To set a complex breakpoint, you must first have an active breakpoint. You
create an active breakpoint with the appropriate V1-V9 or S1-S9 command. Then
you use the CB command to add a condition and a count to the breakpoint to make
it complex.
You can display the current condition, count, and occurrence count for a
complex breakpoint by issuing the CB command with the breakpoint name as an
operand; e.g., "CB S5." ASDT32 will display the breakpoint's condition and
count on the command line so you can change them and reenter them easily. It
also displays the occurrence count, or the number of times the complex
breakpoint has been hit, on the message line.
ΓòÉΓòÉΓòÉ 7.5. Multi-process, Multi-thread Breakpoints ΓòÉΓòÉΓòÉ
All breakpoints that are set are maintained across all processes and threads
that are running. You can deactivate a breakpoint that is set for one process
or thread while ASDT32 has control over some other process or thread.
Similarly, you can reactivate a breakpoint that belongs to another process or
thread.
See S1-S9 - Set Breakpoints S1-S9 and D1-D9 - Select Display for details on how
to deactivate and reactivate breakpoints. Pay particular attention to the
caveats given.
ΓòÉΓòÉΓòÉ 7.6. Sticky Breakpoints ΓòÉΓòÉΓòÉ
You can force ASDT32 to stop on every occurrence of a breakpoint by using the
SB command. This sticky nature is usually reserved for physical address
breakpoints and breakpoints which resolve to a linear address that is above the
512M line. See SB - Sticky Breakpoint for more information on sticky
breakpoints.
ΓòÉΓòÉΓòÉ 8. Hardware Debug Registers ΓòÉΓòÉΓòÉ
In addition to the V1-S9 breakpoints, ASDT32 allows you to set the hardware
debug registers. These registers support both instruction and data breakpoints
and can pinpoint when a data item (for example) is altered.
See T0 - Suspend/Reactivate Hardware Debug Registers and T1-T4 - Set Hardware
Debug Registers for details on how to set/reset and arm/disarm the hardware
debug registers.
ΓòÉΓòÉΓòÉ 9. Indirect Addressing ΓòÉΓòÉΓòÉ
In addition to numeric values and ASDT32 variables, you can use indirect
addressing to reference the contents of memory. This allows you to examine and
use memory contents without having to look at the memory locations directly
using the various ASDT32 windows.
ΓòÉΓòÉΓòÉ 9.1. How to Use Indirect Addresses ΓòÉΓòÉΓòÉ
ASDT32 distinguishes indirect addresses by a trailing "%" and an optional
length. The syntax for an indirect address is:
target = expr %L
where:
target = the variable or register you wish to change,
expr = an ASDT32 expression for an address,
% = the trigger for an indirect address, and
L = the number of bytes you want to reference.
Valid values for L are 1, 2, 4, and 6. If you do not specify any value for L,
then L defaults to 1. If L is 4, ASDT32 treats the 4 bytes in memory as a
4-byte (selector:offset) pointer if expr is similarly constructed. Otherwise,
the 4 bytes in memory are treated as a fixed 32-bit linear or physical address
(again depending on expr). L must follow immediately after the "%."
ΓòÉΓòÉΓòÉ 9.2. Indirect Addressing Examples ΓòÉΓòÉΓòÉ
The following examples illustrate various ways you can use indirect addresses:
AX = DS:SI %2 uses (DS:SI) -> memory for 2 bytes.
AH = DS:SI % uses (DS:SI) -> memory for 1 byte.
S1 = SS:BP%4 uses (SS:BP) -> memory for 4 bytes. Note that S1 is
set to a 16:16 pointer.
S1 = 12345678!%4 uses (physical address 12345678) -> memory for 4
bytes. Note that S1 is set to a 32-bit physical
value.
S1 = SS:EBP%6 uses (SS:EBP) -> memory for 6 bytes. Note that S1
is set to a 16:32 pointer.
BL = DS:SI %4 % uses (DS:SI) -> memory to get a selector:offset
pointer, which will in turn be used to access 1 byte
of memory.
ΓòÉΓòÉΓòÉ 10. Address Conversion ΓòÉΓòÉΓòÉ
You will often find it convenient to have ASDT32 convert a given virtual 8086
segment:offset or protected-mode selector:offset address to its corresponding
linear address. Further, you may find it useful to have ASDT32 convert any
address to its corresponding physical address. ASDT32 allows you to do this
with the use of the "~" and "~~" operators.
ΓòÉΓòÉΓòÉ 10.1. How to Use the Address Conversion Operators. ΓòÉΓòÉΓòÉ
The "~" operator causes ASDT32 to convert a running expression to its
corresponding linear address. The syntax for this operation is:
target = expr~
where:
target = the variable or register you wish to change,
expr = an ASDT32 expression for an address (that is not physical), and
~ = the trigger for linear address conversion
The "~~" operator causes ASDT32 to convert a running expression to its
corresponding physical address. The syntax for this operation is:
target = expr~~
where:
target = the variable or register you wish to change,
expr = an ASDT32 expression for an address (that is not physical), and
~~ = the trigger for physical address conversion
ΓòÉΓòÉΓòÉ 10.2. Address Conversion Examples ΓòÉΓòÉΓòÉ
The following examples illustrate various ways you can use address conversion:
M1 = DS:ESI~ converts (DS:ESI) to its corresponding linear
address.
S1 = 12345678~ converts linear address 12345678 to linear address
12345678 (no change, basically).
EAX = SS:BP~ converts virtual 8086 (SS:BP) to its corresponding
linear address.
S1 = 12345678~~ converts linear address 12345678 to its
corresponding physical address.
Note: You can not use a physical address on the left side of the "~" and "~~"
operators. Also, if you have changed the linear base address of the LDT (using
the LD command), and you are now trying to convert some address to its
corresponding physical address, ASDT32 assumes that you want to know the
physical address relative to the LDT that you are investigating.
ΓòÉΓòÉΓòÉ 11. Hints for Using ASDT32 ΓòÉΓòÉΓòÉ
These hints are intended to aid your use of ASDT32. They range from very simple
hints to more advanced ideas.
ΓòÉΓòÉΓòÉ 11.1. Profile Use ΓòÉΓòÉΓòÉ
ASDT32 will read a profile from disk if you specify the profile name in the
CONFIG.SYS file. The Execute Profile (EP) command is used to execute the
commands in the profile.
You can put any valid ASDT32 command or string of commands into a profile.
Suggested commands include Define Key (DK) commands that define function keys
that don't have defaults, commands to set up the display and colors as you want
them, and common ASDT32 commands you use each time you debug a program.
ΓòÉΓòÉΓòÉ 11.2. Symbol usage ΓòÉΓòÉΓòÉ
ASDT32 provides access to Public data that has been extracted from an OS/2 3.0
LINK386 or LINK map. (Note that ASDT32 allows for multiple maps in this
process.) A REXX (OS/2) module, ASDT32SM.CMD, performs this extraction for you,
and the resulting symbol file name (with a file extension of .SYM) should be
specified on the ASDT32 parameter line in the CONFIG.SYS file.
During the initialization phase, ASDT32 will request system memory and put the
extracted symbol file there. When you enter ASDT32, you can then use the '@'
trigger to use a symbol name on the command line. E.g., M1=@_myproc will set
the M1 address to that of the resolved address for Public entry _myproc.
You can use symbol names in your ASDT32 profile, too. This would enable you to
set many breakpoints or key disassembly/memory lines to Public names whose
addresses move between compilations of your program.
In the disassembly and memory windows, in the operand address, and in the
breakpoint display area, ASDT32 may substitute a symbol name for a given line
address. This assumes that these addresses correspond to some symbol read in.
The QS and WI commands are used in association with symbols. See QS - Qualify
Segment Number and WI - What is Address for information on how these commands
enhance symbol support.
ΓòÉΓòÉΓòÉ 11.3. Disassembly ΓòÉΓòÉΓòÉ
ASDT32 provides a single instruction disassembly function even when you don't
have a disassembly window shown. The disassembly of the next instruction to be
executed, identified by the "EX" display, is always shown. If you set the
primary window to disassembly, then disassembled instructions are shown
beginning at L1, and ASDT32 will track the next instruction to be executed and
will always display it at L1.
You can indicate whether AL86 or Intel mnemonics are to be used by using the DA
command or the DM command. If the instruction has an operand which references
memory, the operand address is calculated and displayed as the OP variable. The
non-displayed Instruction Length (IL) variable contains the length of the
current instruction in bytes.
You can use the variables OP and IL as command operands. For example, use the
command L1=OP to display the contents of memory at the current instruction's
operand address. This is the same operand address shown at the right side of
the first instruction in the disassembly window. Use the IL variable when
procedure stepping, as in "S9=EX+IL;EX;S9," which sets a breakpoint at the
instruction following the one about to be executed.
The disassembly function shows the instruction when a breakpoint is set. The
disassembly indicates that you have set the breakpoint at the proper place and
should help prevent inadvertent breakpoints in the middle of instructions. If a
breakpoint is placed in the middle of an instruction, the breakpoint will not
be hit during normal execution, and the instruction will probably be changed so
that it executes incorrectly.
ΓòÉΓòÉΓòÉ 11.4. Display Screens and Breakpoints ΓòÉΓòÉΓòÉ
A useful debugging technique is to use a different ASDT32 display (D1-D9) for
each program (process) or code segment (CSECT or thread) being debugged. You
can switch from screen to screen and can also save the contents of one screen
into another. On each screen, the CO, breakpoints, disassembly locations, and
memory locations are unique. The registers and flags are the same across
screens.
When an EX or ST command is executed, and the processor is subsequently stopped
by a breakpoint, the ASDT32 display screen containing that breakpoint is
automatically displayed. If the processor is stopped by something other than a
breakpoint, the ASDT32 display that was active at the time of the EX or ST
remains active.
Each of the nine displays has nine V breakpoints and nine S breakpoints
available, which provides a total of 162 possible breakpoints. The S
breakpoints are turned on when set, but the V breakpoints are not turned on
until set on with a command. This gives the V breakpoints scratch pad function.
Note: Due to screen space considerations, the V breakpoints are displayed via
the CB command.
ΓòÉΓòÉΓòÉ 11.5. Viewing Other OS/2 Sessions ΓòÉΓòÉΓòÉ
Viewing other OS/2 sessions while under ASDT32 requires a few steps. First,
you need to issue the HT command. After the current thread has been halted,
you can then enter a Ctrl-Esc sequence to locate a specific session (your host
370 session included). If you choose to switch to your host 370 session, you
could view listings of the halted thread. The Ctrl-Esc sequence will enable you
to begin another session at this point, too.
Returning to ASDT32 requires a few steps as well. First, you need to enter
Alt-Esc keystrokes to get back to the screen group that contains the halted
thread. Then you can press the hot key (the ASDT32 hot key if it is enabled)
to enter ASDT32. Finally, you should issue the RT command to allow the halted
thread to resume.
Note: You should realize that when you halt a thread under ASDT32, other
threads will still be running. If any of these threads cause an ASDT32-trapped
event, ASDT32 will get control again. Additionally, the "complexion" of your
ASDT32 environment may have changed somewhat when you return to ASDT32 since
other processes are running.
ΓòÉΓòÉΓòÉ 11.6. Remote Terminal ΓòÉΓòÉΓòÉ
ASDT32 can be moved to a remote terminal (if you have one connected via a COMn
port (n=1 or 2)) with the "CG RT n" command. Your application will be displayed
on the host machine's terminal. ASDT32 knows to display its screen on the
remote terminal when you issue the "CG RT n" command. To tell ASDT32 to use a
remote terminal from its invocation, use the /R=n parameter. See CG -
Configuration for more information about remote terminals.
The "CG RT n" command can be placed in a profile or can be assigned to a
function key.
ΓòÉΓòÉΓòÉ 11.7. Miscellaneous Tidbits ΓòÉΓòÉΓòÉ
This section describes some features or the inner workings of ASDT32 that don't
seem to have a home for discussion in any other section!
ΓòÉΓòÉΓòÉ 11.7.1. Filtering ΓòÉΓòÉΓòÉ
ASDT32 filters several IDT interrupts. The interrupts that are filtered are
the keyboard, the general protection fault (GPF), invalid opcode, and stack
fault. In essence, if ASDT32 owns the interrupt, ASDT32 will be entered. Now
ASDT32 needs to decide if it should put up its display screen for debugging or
if it should pass the condition on to another handler.
In the case of the keyboard interrupt, this is fairly simple. If ASDT32 is
looking for a hot key (i.e., ASDT32 is not in control), it compares the scan
code from the keyboard processor with the currently defined hot key scan code.
If a match occurs, ASDT32 presents the debug screen. If not, ASDT32 restores
the scan code on the keyboard processor, and then it restores the interrupt
information and jumps to the OS/2 3.0 keyboard handler.
In the case of a GPF or an invalid opcode interrupt, ASDT32 must decide if the
faulting instruction belongs to a system component. ASDT32 will look at the
pushed CS selector value, the task state register, or the virtual 8086 mode
flag in the pushed eflags image to make its decision. If ASDT32 decides not to
handle the GPF or invalid opcode interrupt, it returns control to the
respective OS/2 3.0 handler.
In the case of a stack fault, ASDT32 only handles limit violations. ASDT32
looks at the error code on the stack to see if it is zero. If so ASDT32
displays the debug screen. If not, it returns control to the OS/2 3.0 stack
fault handler.
ΓòÉΓòÉΓòÉ 11.7.2. Screen saving ΓòÉΓòÉΓòÉ
ASDT32 tries its heart out to save the user screen before it displays its own
text screen. If you are running with the remote terminal option, this is
unnecessary, and if the user display is in a text mode to begin with, this is
trivial.
Unfortunately, with OS/2 3.0 many times the display is in a graphics mode for
the Presentation Manager (PM). This means that it is a very complex task for
ASDT32 to save the contents of the adapter's registers along with the display
memory planes before it establishes a text mode for its own screen.
The implication of this is that ASDT32 may not be able to establish a text mode
for its screen if you are using an adapter that it does not know about. If
ASDT32 can establish a text mode and put up its debug display, you may find
detritus on the graphics-mode display upon return to the user application or
when the SC command is used.
If detritus occurs upon the display of a saved graphics-mode display, it is
because ASDT32 employs a run-and-count algorithm to save the display memory
planes. ASDT32 has a limited amount of memory it can use to hold the values
from these saved planes, and it frequently exhausts the save area before all
the information is collected. Hence, when an ensuing display restore operation
occurs, ASDT32 can not restore all of the original information.
ΓòÉΓòÉΓòÉ 12. ASDT32 Command Reference ΓòÉΓòÉΓòÉ
This section describes each of the available ASDT32 commands. Commands are
listed alphabetically except for command groups, which are at the beginning of
the list. These groups are the general register commands, the selector register
commands, the specific register commands, the flag commands, and the vector
commands.
In many cases, a command description will apply to a set of commands. For
example, the commands V1, V2, ..., V9 are described under the command format
"V1-V9."
ΓòÉΓòÉΓòÉ 12.1. AX BX CX DX AH AL BH BL CH CL DH DL EAX EBX ECX EDX - General Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the specified processor register.
Format: reg [= expr]
reg Any of AX, BX, CX, DX, AH, AL, BH, BL, CH, CL, DH, DL,
EAX, EBX, ECX, or EDX.
expr Any ASDT32 expression.
Examples: AX = 13B
Places '013B'x into the AX register.
CX = V1 + BX - 2
Places the sum of the contents of variable V1, the BX register, and
-2 into the CX register.
DX = DS
Copies the contents of the DS register into the DX register.
CL = DH
Copies the contents of the DH register into the CL register.
EAX = 12345678
Places the value '12345678'x into the EAX register.
Remarks: You can alter the general registers (EAX, EBX, ECX, and EDX) in
their entirety or as 16-bit or as 8-bit registers (AX-DX, AL-DL, and
AH-DH).
ASDT32 uses only the least significant 16 bits or 8 bits that result
from an expression evaluation to set a 16-bit or 8-bit register.
ASDT32 truncates any additional bits and displays a warning message.
A null operand sets the register to zero.
ΓòÉΓòÉΓòÉ 12.2. CS DS ES FS GS SS - Selector Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the specified selector register.
Format: reg [= expr]
reg Any of CS, DS, ES, FS, GS, or SS.
expr Any ASDT32 expression.
Examples: CS = 1C42
Places the value '1C42'x into the CS register.
ES = SS
Copies the contents of the SS register into the ES register.
FS = XS
Copies the contents of the XS selector register variable into the FS
register.
Remarks: To save and restore selector register contents, use the XS selector
register variable. ASDT32 treats XS just like a selector register.
Updating the CS register also updates the EX and LC displays.
A null operand sets the selector register to zero.
ΓòÉΓòÉΓòÉ 12.3. SI DI SP BP ESI EDI ESP EBP - Specific Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the specified processor register.
Format: reg [= expr]
reg Any of SI, DI, SP, BP, ESI, EDI, ESP, OR EBP.
expr Any ASDT32 expression.
Examples: BP = 13B
Places '013B'x into the BP register.
SI = V1 + BX - 2
Places the sum of the contents of variable V1, the BX register, and
-2 into the SI register.
ESP = M7
Places the contents of variable M7 into the ESP register.
Remarks: ASDT32 uses only the least significant 16 bits that result from an
expression evaluation to set a 16-bit register. ASDT32 truncates any
additional bits and displays a warning message.
A null operand sets the register to zero.
ΓòÉΓòÉΓòÉ 12.4. FL EFL AF CF DF IF LF NF OF PF RF SF TF VF ZF - Eflags Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the processor eflags register.
Format: flag [= expr]
flag Any of FL, EFL, AF, CF, DF, IF, LF, NF, OF, PF, RF, SF,
TF, VF, or ZF.
expr Any ASDT32 expression.
Examples: CF = 0
Sets the carry flag bit to '0'b.
EFL = 00002246
Sets the eflags register to '00002246'x.
Remarks: The EFL command is used to alter the contents of the entire eflags
register. When using the FL command the operand is evaluated, and
the least significant 16 bits of the evaluation are placed into the
FL register. ASDT32 truncates any additional bits and displays a
warning message.
A null operand sets the entire register to zero.
The remaining commands are used to alter individual bits within the
eflags register. If the command operand is null or evaluates to
zero, ASDT32 sets the flag bit to zero; otherwise, it sets the flag
bit to one.
ΓòÉΓòÉΓòÉ 12.5. IP EIP - Instruction Pointer Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the instruction pointer, updates the EX
variable, and updates the LC variable if appropriate.
Format: reg [= expr]
reg Either of IP or EIP.
expr Any ASDT32 expression.
Examples: IP = 13B
ASDT32 sets the variable IP to '013B'x.
EIP = 1234513B
ASDT32 sets the variable EIP to '1234513B'x.
If the CO variable has any value other than null, ASDT32 tries to
maintain the following relationship:
CO:LC = CS:EIP
This lets you think in terms of your assembly listing offsets.
Remarks: ASDT32 uses only the least significant 16 bits that result from an
expression evaluation when you set the IP. ASDT32 truncates any
additional bits and displays a warning message.
Updating the EIP register also updates the EX and LC displays.
A null operand sets the EIP to zero.
ΓòÉΓòÉΓòÉ 12.6. AS - ASCII ΓòÉΓòÉΓòÉ
Purpose: Changes the current character translation to ASCII.
Format: AS
Examples: AS
All characters are displayed in ASCII format.
Remarks: Changes the characters displayed in the right side of the memory
area and the interpretation of the Code Origin CSECT name.
Initially, the screen is in ASCII format. Choices are ASCII and
EBCDIC. See EB - EBCDIC for the EBCDIC command.
ΓòÉΓòÉΓòÉ 12.7. CA - Color Attributes ΓòÉΓòÉΓòÉ
Purpose: Sets the specified color attribute to the given value.
Format: CA [= term value]
term one of the following:
N Normal attribute.
F Fixed attribute.
H Highlight attribute.
R Reverse attribute.
value The hexadecimal color code. The range of the number is
'00'x to 'FF'x where the first higit describes the
background color and the second higit describes the
character color.
Examples: CA N 07
ASDT32 sets the normal attribute to white on black.
CA H 4F
ASDT32 sets the highlight attribute to high intensity white on red.
CA R 71
ASDT32 sets the reverse attribute to blue on white.
CA
ASDT32 sets the normal, fixed, highlight, and reverse attributes to
their default values.
Remarks: The CA command has no function when ASDT32 is on a monochrome
display.
Defaults: normal screen text is defaulted to high intensity white
on blue ('1F'x), fixed screen text is defaulted to light magenta on
blue ('1D'x), highlighted text defaults to yellow on blue ('1E'x),
and reverse video text is red on white ('74'x).
The majority of the ASDT32 screen is in normal text. Fixed
attributes usually denote items that the user can not modify such as
the text "EAX:" on the first line of the ASDT32 screen. Highlighting
is used to signal items such as an active breakpoint or the code
origin name. Reverse video is used to signal events such as a
breakpoint encountered.
Make sure you do not set a character color equal to its background
color; parts of the screen will be impossible to read if this
occurs. If this happens for all three of the normal, fixed, and
highlighting attributes, the screen will go blank, but ASDT32 will
still be functioning. To read the screen again, type CA and enter it
even though you can't see it. This resets ASDT32's color attributes
to their default values.
The following chart shows the available colors and their numbers:
Number Color Number Color
------ ----- ------ -----
0 Black 8 Gray
1 Blue 9 Light Blue
2 Green A Light Green
3 Cyan B Light Cyan
4 Red C Light Red
5 Magenta D Light Magenta
6 Brown E Yellow
7 White F High intensity White
ΓòÉΓòÉΓòÉ 12.8. CB - Complex Breakpoint ΓòÉΓòÉΓòÉ
Purpose: Sets an active breakpoint as a complex breakpoint with optional
condition and count, displays the current condition and count, or
displays all complex breakpoints.
Format: CB [ bkpt ] [ cond ] , [ count ]
bkpt Any ASDT32 breakpoint (V1-V9 or S1-S9) that is active
on the current ASDT32 display screen.
cond An expression for a condition to be satisfied before
ASDT32 takes the breakpoint.
count Any expression for the number of times for ASDT32 to
hit the breakpoint before it takes the breakpoint.
Examples: CB S1 AX = 3 , 10
Sets S1 as a complex breakpoint. The condition to be met is for AX
to equal three, and ASDT32 will take the breakpoint the sixteenth
time this occurs at the S1 breakpoint's address.
CB V3 ES:EDI <> DS:ESI
Sets V3 as a complex breakpoint. The condition to be met is for the
contents of ES:EDI not to equal the contents of DS:ESI. ASDT32 will
take the breakpoint the first time this occurs at the S1
breakpoint's address.
CB
Displays all eighteen breakpoints for the current ASDT32 display
screen and shows complex breakpoints with their conditions, counts,
and occurrence counts.
Note: This is a method by which you can examine your V1-V9 scratch
pad variables. ASDT32 no longer displays V1-V9 at the top of its
main screen.
CB V8
Displays the condition and count fields for breakpoint V8 on the
command line so you can edit them and reenter them. Also displays
the current occurrence count for V8 on the message line.
Remarks: You can create a complex breakpoint from any active breakpoint. For
introductory information about complex breakpoints, see Setting
Breakpoints.
You use the CB command to create a new complex breakpoint, modify an
existing complex breakpoint, return a complex breakpoint to a simple
breakpoint, and to display all of the complex breakpoints for the
active ASDT32 screen (D1-D9).
If you issue the CB command without any operands, ASDT32 replaces
the ASDT32 screen with a complex breakpoint window. This display
replaces the ASDT32 screen with complex (and simple) breakpoint
information.
The complex breakpoint window displays each possible complex
breakpoint (V1-V9 and S1-S9). For each active breakpoint that is
complex, the address, condition, count, and occurrence count are all
displayed. For each active simple breakpoint, the address is
displayed.
This screen is a "browse" window that does not allow you to edit.
Pressing any key restores the main ASDT32 screen.
ΓòÉΓòÉΓòÉ 12.9. CG - Configuration ΓòÉΓòÉΓòÉ
Purpose: Define the display configuration to use.
Format: CG [= term]
term one of the following:
null reset to single screen.
RT n use COMn (n=1 or 2) to communicate with a
remote terminal.
Examples: CG RT 1
Causes ASDT32 to write its screen to a remote terminal using the
COM1 port.
CG
Changes ASDT32 to the primary display.
Remarks: The CG RT n command switches ASDT32 to a remote terminal that you
have hooked up via the COMn port (n=1 or 2). It is up to you to set
the baud rate or any other communication parameters as ASDT32 only
writes to the COMn port. It is useful to place a command like MODE
COM1:19200,E,7,1 in your STARTUP.CMD even though you may change the
mode under OS/2 at any time.
The use of a remote terminal can be set at ASDT32 installation time
with the /R=n option as well. With this option, you will have
ASDT32 using the remote terminal when it gains control. Issuing the
CG (null) command will always cause ASDT32 to collapse back to the
display of your application.
ΓòÉΓòÉΓòÉ 12.10. CM - Compare Memory ΓòÉΓòÉΓòÉ
Purpose: Compares two memory blocks and displays the differences between
them.
Format: CM addr1 , addr2 , length
addr1 Any ASDT32 expression for the starting address of one
memory block.
addr2 Any ASDT32 expression for the starting address of the
other memory block.
length Any ASDT32 expression for the number of bytes to
compare.
Examples: CM SS:BP , SS:BP+100 , 100
Compares 256 bytes from the location specified by SS:BP with the
same number of bytes from the location specified by SS:BP+'0100'x.
The first 112 bytes of each area are shown on the screen, and
mismatches are highlighted in the first area. The function keys
described below are active.
CM 12345678,78236541,16.
Compares 16 bytes from linear address '12345678'x with the same
number of bytes from linear address '78236541'x. The function keys
described below are active.
Remarks: ASDT32 displays the two compared areas on the screen beginning at
addresses L1 and L8. Differences between the two areas are
highlighted in the first area. Seven lines of each memory area are
shown on the screen, and the number of mismatches on the screen and
in the entire area are shown on the message line.
You can scroll the window up and down in the compared areas. ASDT32
recognizes the following function keys in Compare Memory mode:
Esc Returns to normal ASDT32 operation and
restores the primary window of the screen.
Home Scrolls the compare window up to the
beginning of the compare field.
PgUp Scrolls the compare window up one screen
(seven lines). PgUp takes no action if the
first byte of the compare field is
displayed.
PgDn Scrolls the compare window down one screen
(seven lines). PgDn takes no action if the
last byte of compared memory is displayed
at the beginning of the display area.
Ctrl-Left Arrow Scrolls the compare window up one byte.
Ctrl-Left Arrow takes no action if the
first byte of the compare field is
displayed.
Ctrl-Right Arrow Scrolls the compare window down one byte.
Ctrl-Right Arrow takes no action if the
last byte of compared memory is displayed
at the beginning of the display area.
ΓòÉΓòÉΓòÉ 12.11. CO - Code Origin ΓòÉΓòÉΓòÉ
Purpose: Tells ASDT32 your module's starting address so that ASDT32 can
compute and display a Location Counter which corresponds to your
assembly listing.
Format: CO [= expr]
expr Any ASDT32 expression.
Examples: CO = CS:0426
indicates that your module begins at offset '0426'x from your
program's code segment. ASDT32 displays the CO as "+00000426."
CO = CS:200
indicates that your module begins at offset '0200'x from your
program's code segment. ASDT32 displays the CO as "+00000200."
Remarks: The CO facility enables you to think in terms of your assembly
listing without having to do relocation arithmetic.
ASDT32 displays the Code Origin in a relative address format if
possible. Relative addresses are designated with "+" for CS.
If the CO is set with any of the four addressing schemes, ASDT32
will show the CO as relative to the CS if the address resolves to
within 4K bytes (after) the CS. In this case, the CO will be
displayed as an offset preceded by "+." If not, ASDT32 will display
it as a selector:offset or an 8-higit linear or physical address.
See Setting Breakpoints for more information.
If the CSECT begins with a JUMP instruction around the name of the
CSECT as shown below, the name will be displayed following the CO
display.
ASDT32SMP CSECT
J LABEL1
DC AL1(10)
DC S'ASDT32SMP '
LABEL1 DS 0C
. . .
A null operand sets the CO variable to null.
Whenever CO is set, ASDT32 looks to see if the memory location
specified contains a short jump instruction. If this instruction is
found, ASDT32 assumes that the CSECT name follows 3 bytes further.
ASDT32 will then display this CSECT name (up to 8 characters) in
ASCII or EBCDIC depending on the current display mode.
ΓòÉΓòÉΓòÉ 12.12. CP - Copy Memory ΓòÉΓòÉΓòÉ
Purpose: Copies one memory block to another.
Format: CP addr1 , addr2 , length
addr1 Any ASDT32 expression for the starting address of the
source memory block.
addr2 Any ASDT32 expression for the starting address of the
target memory block.
length Any ASDT32 expression for the number of bytes to copy.
Examples: CP DS:100 , DS:200 , 30.
Copies 30 bytes from the location specified by DS:100 to the
location specified by DS:200.
CP L1 , L1+1 , 100
Makes 256 copies of the character at the memory location addressed
by L1 filling the memory bytes which start at L1+1. This can be used
as a "fill memory" function.
Remarks: The Copy Memory function allows the source block and target block to
overlap, so you could make changes that you don't expect if you
specify blocks that overlap.
An easy way to fill a block of memory with a specific character is
to set L1 to point to the first byte, change the first byte to the
character wanted, and then issue the command "CP L1,L1+1,length"
where you specify the number of copies wanted for the length field.
You may wish to compare two memory blocks after one has been copied
to the other. See CM - Compare Memory for the Compare Memory
command.
ΓòÉΓòÉΓòÉ 12.13. CT - Step Count ΓòÉΓòÉΓòÉ
Purpose Sets the default step count (the number of user program instructions
to execute with the ST command).
Format CT [= expr]
expr Any ASDT32 expression.
Examples: CT 8
ASDT32 sets the step count to eight.
CT
ASDT32 sets the step count to one.
Remarks: ASDT32 uses only the least significant 16 bits that result from an
expression evaluation to set the CT. ASDT32 truncates any additional
bits and displays a warning message.
When you enter the ST command without an operand, ASDT32 gets the
number of user program instructions to be executed from the CT
variable.
If the operand is omitted from the CT command, ASDT32 sets the step
count to one.
ΓòÉΓòÉΓòÉ 12.14. DA - Disassemble AL86 ΓòÉΓòÉΓòÉ
Purpose: Changes the current disassemble mode to IBM AL86 format.
Format: DA
Examples: DA
Instructions will be disassembled using IBM AL86 mnemonics.
Remarks: Disassembles the instructions pointed to by CS:EIP using IBM AL86
mnemonics.
Initially, all disassembled instructions are shown in IBM AL86
mnemonics. Choices are IBM AL86 mnemonics (DA) or Intel (MASM)
mnemonics (DM). See DM - Disassemble MASM (Intel) for the DM
command.
ΓòÉΓòÉΓòÉ 12.15. DK - Define Key ΓòÉΓòÉΓòÉ
Purpose: Sets up, changes, or removes a function key definition.
Format: DK [key [I or D cmds]]
key The key to be defined (F1, F2, ..., F10, S-F1, S-F2,
..., S-F10, C-F1, C-F2, ..., C-F10, A-F1, A-F2, ...,
A-F10).
I Place the commands on the command line and execute them
immediately when the function key is pressed.
D Place the commands on the command line when the
function key is pressed but do not execute them.
cmds A string of valid ASDT32 commands entered as you would
enter them on the command line. This string may contain
semicolons, and the first command may begin with a
slash.
Examples: DK S-F9 I DM
ASDT32 sets the Shift-F9 (S-F9) key to the string "DM." Each time
the S-F9 key is pressed, ASDT32 shows disassembled instructions in
Intel (MASM) mnemonics.
DK A-F5 D DA
ASDT32 sets the Alt-F5 (A-F5) key to the string "DA." Each time the
A-F5 key is pressed, ASDT32 puts this string on the command line.
DK C-F1
ASDT32 removes any command definition for the Ctrl-F1 (C-F1) key.
You do not use the I/D keyword when removing a key definition.
DK
ASDT32 displays the current settings of all of the function keys.
Remarks: ASDT32 supports the function keys F1 through F10, shifted function
keys S-F1 through S-F10, controlled function keys C-F1 through
C-F10, and alternate function keys A-F1 through A-F10. This provides
a total of 40 function keys.
ASDT32 provides default definitions for keys F1 through F10. You can
change these by redefining the key(s) you want to change. The
definitions are listed in Function Keys. If you want to redefine
existing keys or define additional ones, you can include DK commands
in the profile you invoke when you start ASDT32.
You must enter the I (immediate) or D (deferred) keyword when you
define a key. It is not required when you remove a key definition.
If you press a function key which has no definition, ASDT32 displays
a message and takes no other action.
ASDT32 maintains an 800-byte buffer for commands associated with
function keys. If you define many keys to be long commands, it is
possible to run out of room in the buffer. If this happens, ASDT32
will display a message, and you will not be able to make any
additional key definitions in the current ASDT32 session. You can
still use keys that are already defined and can redefine existing
keys.
ΓòÉΓòÉΓòÉ 12.16. DM - Disassemble MASM (Intel) ΓòÉΓòÉΓòÉ
Purpose: Changes the current disassemble mode to the Intel (MASM) format.
Format: DM
Examples: DM
Instructions will be disassembled using Intel (MASM) mnemonics.
Remarks: Disassembles the instructions pointed to by CS:EIP using Intel
(MASM) mnemonics.
Initially, all disassembled instructions are shown in IBM AL86
mnemonics. Choices are IBM AL86 mnemonics (DA) or INTEL (MASM)
mnemonics (DM). See DA - Disassemble AL86 for the DA command.
ΓòÉΓòÉΓòÉ 12.17. DW - Disassembly Window ΓòÉΓòÉΓòÉ
Purpose: Switches to Disassembly Window mode.
Format: DW [value]
value The line number (L1-M6) at which to start the
disassembly window.
Examples: DW
ASDT32 switches the edit portion of the ASDT32 display to a
disassembly window and sets the primary window mode to disassembly.
If a secondary memory window is displayed, ASDT32 removes it.
DW M1
ASDT32 switches lines M1 through M6 of the ASDT32 display to show
disassembled instructions. The primary window mode of ASDT32 is not
changed.
Remarks: The disassembly window displays disassembled instructions in either
text or hexadecimal format. You can toggle between these two modes
of display by using the Ins key while your cursor is in the
disassembly window. The toggle action pertains to the instructions
that belong to the segment in which the cursor lies.
ASDT32 always shows the address of a given line's instruction. If
applicable, ASDT32 also displays the operand of the instruction.
ASDT32 displays the primary window mode at the beginning of line 8
of the ASDT32 screen. If the primary window is disassembly, then L1
and the following disassembly lines track the current CS:EIP as your
program runs. ASDT32 also tracks CS:EIP for a secondary disassembly
window. Initially, the primary window is disassembly.
See MW - Memory Window for the MW command, which changes to a memory
window. See NW - Next Window for the NW command, which switches
among all of the ASDT32 windows.
ΓòÉΓòÉΓòÉ 12.18. D1-D9 - Select Display ΓòÉΓòÉΓòÉ
Purpose: Selects or sets one of the nine ASDT32 display screens.
Format: Dn [Ds or ON or OFF]
n Any of 1-9. Indicates which screen is being selected
(D1-D9).
s Any of 1-9. Indicates which screen is being saved
(D1-D9).
ON Activates the breakpoints for Dn.
OFF Suspends the breakpoints for Dn.
Examples: D4 OFF
All the active breakpoints for screen D4 are suspended.
D5
Screen D5 is selected as the active ASDT32 screen.
D2 = D1
The contents of screen D1 are saved in screen D2.
Remarks: These variables are common to all nine displays: registers, memory,
M7-M9, and step count.
These variables are unique to each display: V1-V9, S1-S9, L1-L9,
M1-M6, and CO.
After ASDT32 has finished executing a block of user instructions, it
will display the screen containing the active breakpoint that
terminated the execution. If more than one screen contains that same
active breakpoint, ASDT32 will display the lowest numbered screen.
The breakpoints of a screen (e.g., Dy) do not have to be activated
when ASDT32 is displaying another screen (e.g., Dx) unless they had
been deactivated previously; that is, when you switch screens from
Dy to Dx, Dy's breakpoints remain active.
Note: When you issue a Dn ON command, the breakpoints for the Dn
screen are associated with the current process and thread ids. This
was implemented so that you could reactivate breakpoints for an
entire screen whose breakpoints had become deactivated due to the
termination of a thread or process. This is different from the
results that you would get if you issued Sn ON commands for the
various deactivated breakpoints on the current screen. See S1-S9 -
Set Breakpoints S1-S9 to learn how reactivating breakpoints with the
Sn ON command differs from the Dn ON command.
See Display Screens and Breakpoints for a discussion of how to use
the nine ASDT32 display screens to your advantage.
ΓòÉΓòÉΓòÉ 12.19. EB - EBCDIC ΓòÉΓòÉΓòÉ
Purpose: Changes the current character translation to EBCDIC.
Format: EB
Examples: EB
All characters are displayed in EBCDIC format.
Remarks: Changes the characters displayed in the right side of the memory
area and the interpretation of the Code Origin CSECT name that may
be displayed.
Initially, the screen is in ASCII format. Choices are ASCII and
EBCDIC. See AS - ASCII for the ASCII command.
ΓòÉΓòÉΓòÉ 12.20. EP - Execute Profile ΓòÉΓòÉΓòÉ
Purpose: Executes a profile containing a series of ASDT32 commands. This
profile must have been read in by ASDT32 during the initialization
phase.
Format: EP
Examples: EP
Executes commands from ASDT32's profile storage area.
Remarks: ASDT32 does not support disk I/O after the OS/2 initialization
phase. Hence, you must have ASDT32 read your profile in during this
initialization phase. ASDT32 stores your profile in its internal
data area where your commands can be retrieved and executed with the
EP command.
To have ASDT32 read in your profile, you need to specify the fully
qualified profile name in your CONFIG.SYS file. You can specify
ASDT32 parameters along with a profile name. See Installing ASDT32
for the syntax rules that allow you to specify a profile and ASDT32
parameters.
ASDT32 limits a profile to 1000 bytes. This includes carriage
returns, line feeds, and end-of-file markers. ASDT32 does not
recognize tabs and can not process commands that are greater than 76
characters in length (not including trailing blanks, carriage
return, and line feed).
Commands from a file are executed one at a time. If an invalid
command is encountered, the appropriate ASDT32 message is displayed,
and profile processing is aborted.
You can execute a profile that has been read in as often as you like
by reissuing the EP command.
ΓòÉΓòÉΓòÉ 12.21. ET - Execute with Timing ΓòÉΓòÉΓòÉ
Purpose: Executes your program with a timing counter enabled. ASDT32 informs
you how much time elapsed when it regains control.
Format ET = expr [, adj]
expr Any ASDT32 expression that defines the execution
termination address.
adj Any ASDT32 expression that defines the amount (in
microseconds) of time with which to adjust that
recorded by ASDT32.
Examples: ET M1
Executes with a timing counter from the current instruction up to
but not including the instruction at address M1.
ET CS:1F4D , 14
Executes with a timing counter from the current instruction up to
but not including the instruction at offset '1F4D'x. ASDT32 will
adjust the time taken by 20 microseconds before reporting.
Remarks: ASDT32 will introduce a time artifact over the interval measured due
to overhead. This artifact is difficult to approximate, hence, you
are given the opportunity to supply the artifact value (in
microseconds).
A way for you to ascertain a good approximation for the environment
you find yourself in is to issue the ET EX command. This will have
your program spin on the current instruction and ASDT32 report the
time taken for this zero-instruction event. The time reported by
ASDT32 is all overhead. A few runs of this should give you the
adjustment value necessary.
The time taken is reported on the ASDT32 message line when control
returns to ASDT32. The value is given (in decimal) in microseconds.
Note that the adjustment value you supply as a parameter to ASDT32
will be interpreted as hexadecimal unless you terminate it with the
"." operator.
ASDT32's precision in the 10-microsecond range is good. In the
microsecond range, it is suspect. Note that ASDT32 can now measure
intervals that take longer than 55 milliseconds. If you want to see
this 55-millisecond rollover, interrupts must be enabled for some
time during this interval.
ASDT32 uses the S9 breakpoint for the terminating address specified.
ASDT32 will leave this breakpoint set for your inspection upon
return. If the address specified is not hit, you can check the value
in S9 the next time ASDT32 gains control.
ΓòÉΓòÉΓòÉ 12.22. EX - Execute ΓòÉΓòÉΓòÉ
Purpose: Passes control of the processor to your program.
Format: EX
Examples: EX
Gives control to your program, which begins executing at the current
CS:EIP.
Remarks: Execution of your program begins at the point determined by the
combination of the CS and EIP registers. ASDT32 restores your
display screen and sets active breakpoints in your program before
execution begins.
Control is retained by OS/2 until ASDT32 receives an interrupt. When
ASDT32 regains control, you are shown the reason in the form of a
message or breakpoint highlight. ASDT32 saves your display screen
and removes the breakpoints from your program.
The processor registers and memory display reflect the processor
status at the time of the interrupt. If any breakpoints were
overlayed by execution of your program, the breakpoint display is
blinked to indicate that that breakpoint was not active for a
portion of your program execution. (This applies only to programs
running in a VDM session).
Note: The first instruction of your program is single-stepped
before the breakpoints are inserted. This permits execution to begin
at the point of a breakpoint without stopping immediately.
ASDT32 sets function key F7 to the EX command on entry.
ΓòÉΓòÉΓòÉ 12.23. F FA FC FE FX - Find, Find ASCII, Find CSECT, Find EBCDIC, Find Hex ΓòÉΓòÉΓòÉ
Purpose: Find character or hexadecimal strings in memory.
Format: Ft [ string ] [ , s ] [ , hiaddr ]
t Type of find (one of the following):
null current mode (ASCII, CSECT, hex, or
EBCDIC)
A ASCII
C CSECT
E EBCDIC
X Hex
string The string to be found in memory. This string may be
delimited by quotes (" ").
s Search technique (one of the following):
* task search (LDT first then the GDT)
expr any ASDT32 expression that determines a
selector for the single segment to search.
If ", hiaddr" is specified, then this "s"
expression is interpreted as the lower
bound address of a system-wide search
(linear or physical) range.
hiaddr any ASDT32 expression that is interpreted as the higher
bound linear or physical address of a system-wide
search range.
Examples: /FX 123E4
Does a repeat find of the '0123E4'x search argument throughout the
task's immediate segment register areas.
/FA buffer; L1 = FX
Does a repeat (task) find of the ASCII-string (buffer) and displays
memory beginning at the location where the string was found.
FE "Top of Data" , DS
Tries to find the EBCDIC-string (Top of Data) in memory beginning at
the start of the DS segment up to its segment limit.
FA " garbage dump ", *
Tries to find the ASCII-string ( garbage dump ) in memory using the
task search technique.
FC SINT3, CS
Tries to find the CSECT name (SINT3) in the current CS segment.
FC AINTHND, 0, 400000
Tries to find the CSECT name (AINTHND) in the system-wide address
range starting at linear address 0 and ending at linear address 4M.
FC AINTHND, 0!, 400000!
Tries to find the CSECT name (AINTHND) in the system-wide address
range starting at physical address 0 and ending at physical address
4M.
FC -
Tries to find the closest (previous) CSECT address relative to the
current CS and EIP address.
Remarks: Task searching is employed for all finds until you specify some
selector, linear, or physical address expression after a comma. The
technique last used is employed in any repeat find. ASDT32 requires
that you use the same addressing scheme (linear or physical) for the
second expression as you use for the first in a system-wide search
technique (", s, hiaddr").
If the string is found, the FX variable contains the address of the
string. If the string is not found, the FX variable remains as it
was before the search request.
Since the second character of the F command is a blank, at least one
blank must always follow the F command. It will operate in the
current character translation mode (ASCII, CSECT, hex, or EBCDIC).
Character strings may not include semicolons. Commas are special
characters and denote that either a task search indicator ("*"), a
selector expression, or a system-wide address range follows. (Note
that a system-wide address will include two commas.) If you want a
comma to be part of your string, enclose the string in quotes.
For strings without delimiting quotes, leading blanks are always
ignored yet trailing blanks are ignored only if there is no
delimiting comma present. Every blank or comma (within the
enclosing quotes) is considered part of the search string when the
quotes are used.
For the F, FA, FC, and FE commands, the string may include upper or
lower case characters, numbers, special characters, and blanks. For
the FX command, the string may contain any of the 16 higits.
If an odd number of higits are entered for the FX command, the
string is padded on the left with one zero higit.
The length of a search string is limited by the command line length
except when ASDT32 is searching for a hex string. ASDT32 limits hex
string searches to 8-higits (4 bytes). The verification message will
only display the first seven characters of the search string.
Searching starts at the beginning of the LDT's first valid data or
code descriptor selector (task search), at the beginning of the most
recently specified selector (segment search), or at the beginning of
a linear or physical address range (system-wide search) unless a
repeat find is done. For repeat find, the search begins where the
previous search terminated. Task searching continues on through the
GDT once the LDT has been exhausted. If ASDT32 discovers a
discontinuity in a linear address search range, it terminates the
search at that point of the system-wide searching. This means that
if a particular address in your linear address search range is not
defined by any page table or is paged out, ASDT32 will not continue
the search.
The FC command will have ASDT32 search only those descriptor
selectors that reference valid code segments (when system-wide
search is not being used). If the CSECT is found, ASDT32 will set
the CO variable if a jump ('EB'x) instruction is discovered three
bytes prior to the CSECT address. See CO - Code Origin for more
information about ASDT32's usage of the code origin variable.
FC - can be used to have ASDT32 search for a CSECT name previous to
the current CS:EIP address. Repeated use of this command will have
ASDT32 continue hunting for the next previous CSECT name within the
CS address space (wrapping at offset 0 and the CS limit).
If the search string is omitted, the previous string will be used.
The repeat find function may be performed by adding a slash to the
beginning of any of the find commands or by using the F5 key.
ASDT32 sets function key F5 to the FX command on entry.
ΓòÉΓòÉΓòÉ 12.24. HP - Help ΓòÉΓòÉΓòÉ
Purpose: Display information about ASDT32.
Format: HP
Examples: HP
Displays a screen containing all the ASDT32 commands in logical
groupings.
Remarks: The help screen temporarily replaces the ASDT32 screen. Press any
key to return to the ASDT32 screen.
ASDT32 sets function key F1 to the HP command on entry.
ΓòÉΓòÉΓòÉ 12.25. HT - Halt Thread ΓòÉΓòÉΓòÉ
Purpose: To suspend the current thread and exit ASDT32 to OS/2.
Format: HT
Examples: HT
Suspends the current thread and returns your session to OS/2.
Remarks: HT should be used primarily to scan other screen groups. The most
popular subset of this action is to view your host session. By
entering the HT command (which causes ASDT32 to halt the current
thread and return to OS/2) and then entering a series of Alt-Esc
keystrokes or a Ctrl-Esc sequence, you can view listings of the
halted thread on your host session. To return to ASDT32, you need
to enter a series of Alt-Esc keystrokes until you are back in the
same screen group where you had ASDT32 suspend the thread. Now you
can enter the hot key (if you have the hot key option enabled) to
give control back to ASDT32. Finally, you can enter the RT command,
which will allow your thread to be resumed. See RT - Resume Thread
to learn more about resuming halted threads.
You can halt up to ten threads if you want. Halting threads as they
give control to ASDT32 allows you to see what impact the remaining
threads that are running have on the system.
You can not halt a thread at a breakpoint. This is due to the fact
that ASDT32 inserts your breakpoints for you before it halts the
thread.
ΓòÉΓòÉΓòÉ 12.26. IB - Input Byte ΓòÉΓòÉΓòÉ
Purpose: Reads one byte from a designated port (into a register if
specified).
Format: IB port [, reg]
port The I/O port address from which the byte is to be read.
reg The 8-bit register into which the byte is to be placed.
Examples: IB 40 , AL
Reads one byte from I/O port '0040'x and places it in register AL.
The port and the value read are shown in a message.
IB 21
Reads one byte from I/O port '0021'x and displays the port and the
value read in a message.
Remarks: To read a port but not place the value read into a register, you can
omit the register name and the message line will display the value
read.
ΓòÉΓòÉΓòÉ 12.27. IW - Input Word ΓòÉΓòÉΓòÉ
Purpose: Reads one word from a designated port (into a register if
specified).
Format: IW port [, reg]
port The I/O port address from which the word is to be read.
reg The 16-bit register into which the word is to be
placed.
Examples: IW 58 , DX
Reads one word from I/O port '0058'x and places it in register DX.
The port and the value read are shown in a message.
IW 31
Reads one word from I/O port '0031'x and displays the port and the
value read in a message.
Remarks: To read a port but not place the value read into a register, you can
omit the register name and the message line will display the value
read.
ΓòÉΓòÉΓòÉ 12.28. LC - Location Counter ΓòÉΓòÉΓòÉ
Purpose: Sets the pseudo-variable, Location Counter (LC), and updates either
the EIP variable or the CO variable.
Format: LC [= expr]
expr Any ASDT32 expression.
Examples: LC = 12D
ASDT32 sets the pseudo-variable LC to '012D'x.
If the CO variable is null, ASDT32 sets the CO variable according to
the formula
CO = CS:EIP-LC
If CO is a linear address, then the CS base linear address is used.
If CO is a physical address, then the CS base physical address is
used.
This provides an alternate means for setting the CO. When CO is
null, the command LC=12D tells ASDT32 that the program counter
(CS:EIP) corresponds to the assembly listing LC value of '012D'x.
ASDT32 computes the origin address and puts it into CO.
If the CO variable has any value other than null, ASDT32 tries to
maintain the following relationship:
CO:LC = CS:EIP
This lets you think in terms of your assembly listing offsets.
Remarks: Normally, you use the Location Counter (LC) in conjunction with the
Code Origin (CO) command to display a program location counter that
corresponds with the offsets in your assembly listing. You should be
familiar with the CO command before using the LC command.
The LC command with a null operand sets both the CO and the LC to
null.
ΓòÉΓòÉΓòÉ 12.29. LD - LDT Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the LDT register or its base linear address.
Format: LD [= expr]
expr Any ASDT32 expression.
Examples: LD = XS
ASDT32 sets the LDT register to the contents of the XS register.
LD 128E3ABC
ASDT32 associates the user's LDT base address with linear address
'128E3ABC'x.
Remarks: The current LDTR is changed when you enter the LD command followed
by a selector expression. When you change the LDT register, the user
program may not be able to continue with the altered value.
When a linear address is used, ASDT32 associates the user's LDT base
address with the one provided. ASDT32 ensures that the address you
specify does indeed point to a valid LDT. You can not step,
terminate, or execute when you have changed the associated user's
LDT base address in this manner. The idea behind this form of the
LD command is to allow you to view another process's LDT entries.
The LD command with a null operand restores the user program's LDT
register and its base address to the incoming values. If you attempt
to set the LDT to an invalid value or have ASDT32 associate the
user's LDT with a linear address that does not reference an LDT,
ASDT32 will display a message and will not act upon your request.
Additionally, ASDT32 does not allow you to set the LDT base address
to a physical address.
Note that when you change the linear address associated with the LDT
register, ASDT32 uses this value internally; i.e., it does not
update the GDT descriptor that the LDT register references. Hence,
you would not see a corresponding difference in the LDT/GDT window.
Further, when you change the linear address associated with the LDT
register, ASDT32 uses the descriptor entries found in the
corresponding LDT. This does not imply that it will use the page
tables associated with that LDT. To accomplish this, you need to
change the LDT linear address (e.g., LD 12345678) and then use the
physical address conversion operator (e.g., L1 F:0~~ in the memory
window). These actions coupled together allow you to view memory
that is associated with some other (not the current) process.
ΓòÉΓòÉΓòÉ 12.30. LW - LDT/GDT Window ΓòÉΓòÉΓòÉ
Purpose: Switches to LDT/GDT Window Mode.
Format: LW [*]
* Indicates that ASDT32 should compress out all invalid
descriptors from display.
Examples: LW
ASDT32 switches the edit portion of the ASDT32 display to an LDT/GDT
window and sets the primary window mode to LDT/GDT.
LW *
Causes ASDT32 to compress out all the invalid descriptors in its
LDT/GDT display.
Remarks: The LDT/GDT window displays descriptor table entries in a decoded,
readable format. Each table entry line displays one descriptor table
entry.
ASDT32 displays the primary window at the beginning of line 8 on the
ASDT32 screen. The LDT/GDT window is not editable, but you can
scroll the entries displayed. See Moving on the Command Line for a
listing of the command line scrolling keys and their function. See
NW - Next Window for the NW command, which switches among all types
of ASDT32 windows.
ΓòÉΓòÉΓòÉ 12.31. L1-L9 - Alter Window Area ΓòÉΓòÉΓòÉ
Purpose: Alter the disassembly and memory edit, the LDT/GDT or IDT, or page
window portion of the ASDT32 display by changing the address of a
window display line.
Each disassembly or memory address variable is displayed in one of
the four addressing schemes that ASDT32 allows. Each LDT/GDT or IDT
address variable is displayed as a 4-higit index. Each page window
address variable is displayed as a linear address.
Format: Ln [= expr]
n The L variable to be manipulated.
expr Any ASDT32 expression.
Examples: L1 = 12345678 (disassembly/memory windows)
Places the hexadecimal value '12345678'x into the L1 variable and
displays the contents of that linear address location.
L2 = SS:ESP (disassembly/memory windows)
Places the contents of registers SS and ESP into the selector and
offset of variable L2 to display your current stack.
L3 = 002F (LDT/GDT window)
Places the hexadecimal value '002F'x into the L3 variable and
displays the descriptor found as if '002F'x had been used as a
selector (in this case, the descriptor will be in the LDT).
L4 = 0003 (IDT window)
Places the hexadecimal value '0003'x into the L4 variable and
displays the descriptor found at the fourth descriptor slot in the
IDT.
L9 = ESI (page window)
Places the linear address (from the ESI register) into the L9
variable and displays the page directory (or table) entry that is
indicated by this linear address.
Remarks: An L1-L9 command without a parameter causes the window that begins
with the specified line to be combined with the previous window. If
the specified line is not the beginning of a window, the command
merely causes the display to be updated.
When you have a secondary window set up, i.e., a memory window in
disassembly mode or a disassembly window in memory mode, you can set
any of the primary address variables and the first address variable
of the secondary window. You cannot set the other secondary window
address variables. (Secondary windows are valid only for the
disassembly and memory windows.)
Commands L1-L9 have the same function as typing over an address in
the window. (Typing over an address in a window is valid only in a
disassembly or memory window.) L1-L9's advantages include the use of
expressions and leaving the cursor on the command line.
When a window address variable is updated with one of these
commands, that variable defines the beginning of a window; the
remaining address variables in that window are also updated. In both
the disassembly and memory windows, ASDT32 may substitute a symbol
name for a given line address. This assumes that the line address
corresponds to some symbol read in. Note that code origin usage
will override this substitution process; i.e., if "$" is present on
a disassembly line, ASDT32 will not substitute the offset address
with a symbol name.
This substitution process extends to the operand address when
possible. The symbol name replacement for an operand address is not
overridden by code origin usage.
Scrolling and skipping functions may be performed for the
disassembly and memory windows with these commands in conjunction
with the "/" key and the ENTER key:
/ L1 = L1 - 10 Does a vertical scroll (upward).
/ L5 = L5 + 1 Does a horizontal scroll (right).
/ L1 = L1 + 200 Does a downward skip through memory and can be
useful for locating a large text buffer in
memory.
These commands may be used in conjunction with one of the FIND
commands to search memory for the occurrence of an item:
/ FA string ; L1 = FX (memory window)
The above sequence searches memory for an ASCII-character string
and, upon finding the string, displays it.
Scrolling and skipping functions may be performed for the LDT/GDT,
IDT, or page windows using the PgUp, PgDn, Ctrl-PgUp, and Ctrl-PgDn
keys. For example:
PgUp Does a vertical scroll of the L1 window
(upward).
Ctrl-PgDn Does a scroll of one line of the L1 window
(downward).
Note that the PgUp, PgDn, Ctrl-PgUp, Ctrl-PgDn, Ctrl-Left Arrow, and
Ctrl-Right Arrow keys provide scrolling in the disassembly and
memory edit windows (not on the command line).
ΓòÉΓòÉΓòÉ 12.32. MW - Memory Window ΓòÉΓòÉΓòÉ
Purpose: Switches to Memory Window mode.
Format: MW [term]
term The line number (L1-M6) at which to start the memory
window.
Examples: MW
ASDT32 switches the edit portion of the ASDT32 display to a memory
window and sets the primary window mode to memory. If a secondary
disassembly window is displayed, ASDT32 removes it.
MW L9
ASDT32 switches lines L9 through M6 of the ASDT32 display to show
memory. The primary window mode of ASDT32 is not changed.
Remarks: The memory window displays memory in hexadecimal and either ASCII or
EBCDIC format. Each memory line displays one paragraph (sixteen
bytes) of memory.
ASDT32 displays the primary window mode at the beginning of line 8
of the ASDT32 screen. If the primary window is disassembly, then L1
and the following disassembly lines track the current CS:EIP as your
program runs. ASDT32 also tracks CS:EIP for a secondary disassembly
window.
See DW - Disassembly Window for the DW command, which changes to a
disassembly window. See NW - Next Window for the NW command, which
switches among all types of ASDT32 windows.
ΓòÉΓòÉΓòÉ 12.33. M1-M6 - Alter Window Area ΓòÉΓòÉΓòÉ
Purpose: Alter the disassembly and memory edit, the LDT/GDT or IDT, or page
window portion of the ASDT32 display by changing the address of a
window display line.
Each disassembly or memory address variable is displayed in one of
the four addressing schemes that ASDT32 allows. Each LDT/GDT or IDT
address variable is displayed as a 4-higit index. Each page window
address variable is displayed as a linear address.
Format: Mn [= expr]
n The M variable to be manipulated.
expr Any ASDT32 expression.
Examples: M1 = A88762! (disassembly/memory windows)
Places the hexadecimal value 'A88762'x into the M1 variable and
displays the contents of that physical address location.
M2 = CS:EIP (disassembly/memory windows)
Places the contents of registers CS and EIP into the selector and
offset of variable M2 to display your current instruction stream.
M4 = 0020 (LDT/GDT window)
Places the hexadecimal value '0020'x into the M4 variable and
displays the descriptor found as if '0020'x had been used as a
selector (in this case, the descriptor will be in the GDT).
M5 = 0008 (IDT window)
Places the hexadecimal value '0008'x into the M5 variable and
displays the descriptor found at the ninth descriptor slot in the
IDT.
M6 = EIP (page window)
Places the linear address (from the EIP register) into the M6
variable and displays the page directory (or table) entry that is
indicated by this linear address.
Remarks: An M1-M6 command without a parameter causes the window that begins
with the specified line to be combined with the previous window. If
the specified line is not the beginning of a window, the command
merely causes the display to be updated.
When you have a secondary window set up, i.e., a memory window in
disassembly mode or a disassembly window in memory mode, you can set
any of the primary address variables and the first address variable
of the secondary window. You cannot set the other secondary window
address variables. (Secondary windows are valid only for the
disassembly and memory windows.)
Commands M1-M6 have the same function as typing over an address in
the window. (Typing over an address in a window is valid only in a
disassembly or memory window.) M1-M6's advantages include the use of
expressions and leaving the cursor on the command line.
When a window address variable is updated with one of these
commands, that variable defines the beginning of a window; the
remaining address variables in that window are also updated. In both
the disassembly and memory windows, ASDT32 may substitute a symbol
name for a given line address. This assumes that the line address
corresponds to some symbol read in. Note that code origin usage
will override this substitution process; i.e., if "$" is present on
a disassembly line, ASDT32 will not substitute the offset address
with a symbol name.
This substitution process extends to the operand address when
possible. The symbol name replacement for an operand address is not
overridden by code origin usage.
Scrolling and skipping functions may be performed with these
commands in conjunction with the "/" key and the ENTER key:
/ M1 = M1 - 10 Does a vertical scroll (upward).
/ M5 = M5 + 1 Does a horizontal scroll (right).
/ M1 = M1 + 200 Does a downward skip through memory and can be
useful for locating a large text buffer in
memory.
These commands may be used in conjunction with one of the FIND
commands to search memory for the occurrence of an item:
/ FA string ; M1 = FX (memory window)
The above sequence searches memory for an ASCII-character string
and, upon finding the string, displays it.
Scrolling and skipping functions may be performed for the LDT/GDT,
IDT, or page window using the PgUp, PgDn, Ctrl-PgUp, and the
Ctrl-PgDn keys. For example:
PgUp Does a vertical scroll of the L1 window
(upward).
Ctrl-PgDn Does a scroll of one line of the L1 window
(downward).
Note that the PgUp, PgDn, Ctrl-PgUp, Ctrl-PgDn, Ctrl-Left Arrow, and
Ctrl-Right Arrow keys provide scrolling in the disassembly and
memory edit windows (not on the command line).
ΓòÉΓòÉΓòÉ 12.34. M7-M9 - Set Variables M7-M9 ΓòÉΓòÉΓòÉ
Purpose: Sets variables M7-M9. These variables provide scratch pad space,
which reflect one of the four addressing schemes that ASDT32 allows
as designated by the assigning expression.
Format: Mn [= expr]
n The M variable to be manipulated.
expr Any ASDT32 expression.
Examples: M7 = 33F9AB
Places the value '33F9AB'x into the M7 variable.
M8 = V1:DI
Places the contents of variable V1 and register DI into the selector
and offset of variable M8.
Remarks: Since these variables are not displayed, ASDT32 shows you a
confirmation message indicating the variable name and value each
time one of these variables is set.
M7 = 111111 + 222222
produces the confirmation message
M7 = 333333
In order to display the contents of one of these variables, you can
copy the variable into itself to produce a confirmation message
(M8=M8).
The selector and offset portions of the M7-M9 variables are kept
separately, so you can use these variables when you want to keep
both selector and offset parts of an address.
A variable command with a null operand sets the variable to null.
ΓòÉΓòÉΓòÉ 12.35. NP - Not Present ΓòÉΓòÉΓòÉ
Purpose: Pages in memory (application-level code or data) that is valid but
is currently not present.
Format: NP = expr
Examples: NP CS:13000
Pages in the code page associated with this address.
Remarks: ASDT32 can page in memory for an application if it is valid but
currently not present. Generally, you will want to use this
function when you need to disassemble code or peek at data that has
not been reached/accessed yet.
Note that you have to be running at the application level when you
issue this command. (Page faults that occur while you are at the
system level crash the OS. ) Additionally, the memory that you are
interested in making present must also be faultable.
ΓòÉΓòÉΓòÉ 12.36. NW - Next Window ΓòÉΓòÉΓòÉ
Purpose: Switches to the next ASDT32 window (memory, LDT/GDT, IDT, page, or
disassembly).
Format: NW
Examples: NW
Switches among the ASDT32 windows in the following order:
Disassembly
Memory
LDT/GDT
IDT
Page
Remarks: ASDT32 switches the edit portion of the ASDT32 display to the next
primary window in the sequence with that window's previously-defined
segments and secondary window (if any).
The disassembly window displays disassembled instructions in either
hexadecimal or text format (you can toggle between these two
formats). If applicable, ASDT32 also displays the operand of the
instruction.
The memory window displays memory in hexadecimal and either ASCII or
EBCDIC format. Each memory line displays one paragraph (sixteen
bytes) of memory.
The LDT/GDT and IDT windows display descriptor table entries in a
decoded, readable format. Each table entry line displays one
descriptor table entry.
The page window displays page directory or page table entries in a
decoded, readable format. Each directory or table entry line
displays one entry.
ASDT32 displays the primary window mode at the beginning of line 8
of the ASDT32 screen.
If the primary window is disassembly, then L1 and the following
disassembly lines track the current CS:EIP as your program runs.
ASDT32 also tracks CS:EIP for a secondary disassembly window.
See MW - Memory Window for the MW command, which changes to a memory
window. See LW - LDT/GDT Window for the LW command, which changes to
an LDT/GDT window. See VW - IDT Window for the VW command, which
changes to an IDT window. See PW - Page Window for the PW command,
which changes to a page window. See DW - Disassembly Window for the
DW command, which changes to a disassembly window.
ASDT32 sets function key F4 to the NW command on entry.
ΓòÉΓòÉΓòÉ 12.37. OB - Output Byte ΓòÉΓòÉΓòÉ
Purpose: Writes one byte to a designated port.
Format: OB port [, value]
port The I/O port address to which the byte is to be
written.
value The register, expression, or ASDT32 variable to output
to the port.
Examples: OB 40 , DL
Writes the contents of the DL register to I/O port '0040'x.
OB 21 , BH + CH
Writes the sum of the contents of the BH and CH registers to I/O
port '0021'x.
OB 38
Writes '00'x to I/O port '0038'x.
OB AH , AL
Writes the contents of the AL register to the port specified by the
contents of the AH register.
Remarks: ASDT32 writes a zero to the port if you omit the value.
The port and the value written are shown in a message.
ΓòÉΓòÉΓòÉ 12.38. OW - Output Word ΓòÉΓòÉΓòÉ
Purpose: Writes one word to a designated port.
Format: OW port [, value]
port The I/O port address to which the word is to be
written.
value The register, expression, or ASDT32 variable to output
to the port.
Examples: OW 58 , AX
Writes the contents of the AX register to I/O port '0058'x.
OW 21 , BX + CX
Writes the sum of the contents of the BX and CX registers to I/O
port '0021'x.
OW 38
Writes '0000'x to I/O port '0038'x.
OW AX+BX , 10
Writes '0010'x to the port specified by the sum of the contents of
the AX and BX registers.
Remarks: ASDT32 writes a zero to the port if you omit the value.
The port and the value written are shown in a message.
ΓòÉΓòÉΓòÉ 12.39. PD - Print Disassembly ΓòÉΓòÉΓòÉ
Purpose: Prints the current ASDT32 disassembly window at the LPT1 address.
Format: PD [expr] [,comport]
expr Any ASDT32 expression to represent the number of bytes
to be disassembled and printed. 4K is the maximum.
comport Either 1 or 2 to designate com1 or com2.
Examples: PD 100
ASDT32 starts disassembling and printing from the disassembly window
L1 address for 256 bytes.
PD 100,1
ASDT32 starts disassembling from the disassembly window L1 address
for 256 bytes, and sends the data over the com1 port.
Remarks: ASDT32 will print or send from the disassembly L1 address to the end
of the designated segment, to the last page-mapped byte, or for the
number of bytes that you specified up to a maximum of 4K bytes
(whichever occurs first).
Note: :LPT1 is assumed and if expr is null while the disassembly
window L1 address is physical, ASDT32 will disassemble and print 4K
bytes!
ΓòÉΓòÉΓòÉ 12.40. PI - Program Identification ΓòÉΓòÉΓòÉ
Purpose: Identifies the current thread's invocation path.
Format: PI [Sn]
Sn Any of the ASDT32 breakpoints, V1-V9 and S1-S9.
Examples: PI
Lists the current thread's invocation path on the ASDT32 message
line.
PI S4
Lists the invocation path of the thread that is associated with the
S4 breakpoint on the ASDT32 message line.
Remarks: PI is useful in determining what program caused ASDT32 to get
control. This is especially helpful on a general protection fault.
ΓòÉΓòÉΓòÉ 12.41. PM - Print Memory ΓòÉΓòÉΓòÉ
Purpose: Prints the current ASDT32 memory window at the LPT1 address.
Format: PM [expr] [,comport]
expr Any ASDT32 expression to represent the number of bytes
to be formatted and printed. 4K is the maximum.
comport Either 1 or 2 to designate com1 or com2.
Examples: PM 200
ASDT32 starts formatting and printing from the memory window L1
address for 512 bytes.
PM 200,1
ASDT32 starts formatting from the memory window L1 address for 512
bytes, and sends the data over the com1 port.
Remarks: ASDT32 will print or send from the memory L1 address to the end of
the designated segment, to the last page-mapped byte, or for the
number of bytes that you specified up to a maximum of 4K bytes
(whichever occurs first).
Note: :LPT1 is assumed and if expr is null while the memory window
L1 address is physical, ASDT32 will format and print 4K bytes!
ΓòÉΓòÉΓòÉ 12.42. PR - Print Screen ΓòÉΓòÉΓòÉ
Purpose: Prints the current ASDT32 screen or the saved user screen.
Format: PR [U]
U Indicates that the saved user screen is to be printed
instead of the ASDT32 screen.
Examples: PR
Prints the ASDT32 screen to the printer at the LPT1 address.
PR U
Prints the saved user screen to the printer at the LPT1 address.
Remarks: ASDT32 uses the LPT1 address for printing. You can also type the
PrtSc key while ASDT32 is in control to obtain a printout of
ASDT32's screen.
Note: You should ensure that the saved screen is in text mode
before it is printed. Otherwise, ASDT32 will dump 2000 bytes of
compressed video plane data with unpredictable results.
ΓòÉΓòÉΓòÉ 12.43. PW - Page Window ΓòÉΓòÉΓòÉ
Purpose: Switches to Page Window Mode.
Format: PW [D or T or *]
D Indicates that page directory entries should be shown
for each linear address line variable.
T Indicates that page table entries should be shown for
each linear address line variable.
* Indicates that ASDT32 should compress out all invalid
page directory or page table entries from display.
Examples: PW
ASDT32 switches the edit portion of the ASDT32 display to a page
window and sets the primary window mode to PDE or PTE.
PW D
Causes ASDT32 to display page directory entries and set the primary
window mode to PDE.
PW T
Causes ASDT32 to display page table entries and set the primary
window mode to PTE.
PW *
Causes ASDT32 to compress out all the invalid page directory or
table entries from the ASDT32 display.
Remarks: The page window displays page directory or table entries in a
decoded, readable format. Each table entry line displays one page
directory or table entry. The linear address of a given line
variable is used by ASDT32 to determine which page directory or
table entry to display. The default is for ASDT32 to display page
table entries.
ASDT32 displays the primary window at the beginning of line 8 on the
ASDT32 screen. The page window is not editable, but you can scroll
the entries displayed. See Moving on the Command Line for a listing
of the command line scrolling keys and their function. See NW - Next
Window for the NW command, which switches among all types of ASDT32
windows.
ΓòÉΓòÉΓòÉ 12.44. QS - Qualify Segment Number ΓòÉΓòÉΓòÉ
Purpose: Qualifies a segment number (for a Public symbol).
Format: QS seg# [, sel]
seg# The segment number that you wish to qualify or
interrogate. If you do not specify a qualifying
selector, ASDT32 displays the current qualification of
the segment number on the message line.
sel any ASDT32 expression that determines a selector that
is to qualify the segment number.
Examples: QS 1
Displays the current selector that qualifies segment number 1.
QS 2, CS
Qualifies segment number 2 to the CS value.
Remarks: When you extract Public data from a LNK386 map file using
ASDT32SM.CMD, the resulting .SYM file has a segment number and
offset that pertains to each symbol. ASDT32 uses the segment number
for a symbol to return a selector value as part of the address.
ASDT32 does not know which selector value to associate with a given
segment number. Hence, the QS command allows you to specify this
value.
If you do not qualify a segment number, ASDT32 defaults all segment
numbers to be qualified by 0 (the null selector). ASDT32 will try
to guess what selector should be associated with a zero-qualified
segment using segment length data located in the LDT and GDT
entries. This procedure is not guaranteed to succeed. Hence, when
it fails, you should qualify the segment number via the QS command.
You can use a string of QS commands conveniently in an ASDT32
profile. See EP - Execute Profile for more information about
executing profiles while in ASDT32
ΓòÉΓòÉΓòÉ 12.45. RC - Retrieve Command ΓòÉΓòÉΓòÉ
Purpose: Re-displays the last command line that was entered.
Format: RC
Examples: RC
Re-displays the last command line that was entered and places the
cursor at the end of the command line.
Remarks: ASDT32 saves the contents of up to ten command lines in a circular
queue. Repeated RC commands will re-display the last ten command
lines in reverse order.
Commands entered via function keys or from a profile are not
included in the saved command line queue.
ASDT32 sets function key F10 to the RC command on entry.
ΓòÉΓòÉΓòÉ 12.46. RI - Restore Interrupt ΓòÉΓòÉΓòÉ
Purpose: Restores an ASDT32 interrupt to OS/2.
Format: RI = expr
expr Any ASDT32 expression that indicates which interrupt
you want ASDT32 to restore to OS/2.
Examples: RI 0
ASDT32 restores control of interrupt 0 to OS/2.
RI C
ASDT32 restores control of interrupt '0C'x to OS/2.
Remarks: ASDT32 controls various interrupts to gain control when some action
that generates one of these interrupts occurs. There are times when
your device driver needs to control one of these ASDT32 interrupts.
By using the RI command, you can have ASDT32 relinquish control of a
specific interrupt.
You can tell ASDT32 not to take over a specific interrupt during its
installation by using the /n parameter (where n is one of 0, 1, 2,
3, 6, 8, C, or D).
See TI - Take Interrupt for information on how to take an ASDT32
interrupt away from OS/2 for ASDT32's usage.
ΓòÉΓòÉΓòÉ 12.47. RK - Reset Keyboard Hot Key ΓòÉΓòÉΓòÉ
Purpose: Resets ASDT32's monitoring for a hot key.
Format: RK
Examples: RK
ASDT32 no longer monitors keystrokes when it is not in control.
Remarks: Subsequent hot key keystrokes do not return processor control to
ASDT32.
The use of the keyboard hot key can be set at ASDT32 installation
time with the /K option or at any other time with the SK command.
Setting this option causes ASDT32 to monitor all keystrokes when it
is not in control to see if you have requested the hot key function.
When your program is running and this option is set, a hot key will
return control to ASDT32.
Resetting this option with the RK command removes ASDT32 keystroke
monitoring duties.
ΓòÉΓòÉΓòÉ 12.48. RT - Resume Thread ΓòÉΓòÉΓòÉ
Purpose: Resumes threads that were halted by the HT command.
Format: RT [= pid]
pid The process id of a specific thread that you halted
with the HT command.
Examples: RT
ASDT32 resumes in LIFO fashion any threads that were halted using
the HT command.
RT 000B
ASDT32 resumes the thread that was halted by using the HT command
and has a process id number of eleven.
Remarks: The RT command allows a previously halted thread to resume its
processing. You can use the HT and RT commands in conjunction with
other keystrokes to view your host listings. See HT - Halt Thread
for more information.
If you intend to resume halted threads in some other manner than the
default LIFO fashion adopted by the RT command, then you need to
remember the process id that is associated with each thread that you
halt. ASDT32 displays a thread's process id on line 1 of the ASDT32
display.
ΓòÉΓòÉΓòÉ 12.49. SB - Sticky Breakpoint ΓòÉΓòÉΓòÉ
Purpose: To make a specific breakpoint or all breakpoints sticky.
Sticky is defined to mean that ASDT32 will stop on a given
breakpoint regardless of the current PID and TID.
Format: SB [ON or OFF or Sn ON or Sn OFF]
Sn Any ASDT32 breakpoint (V1-S9).
Examples: SB ON
Sets a global sticky flag, which tells ASDT32 to stop on every 'CC'x
(breakpoint interrupt) that is encountered.
SB OFF
Resets the global ASDT32 sticky flag so that a decision is made by
ASDT32 on whether to stop on the current breakpoint based on PID and
TID comparisons.
SB S3 ON
Makes S3 sticky without affecting the status of any other
breakpoint.
SB S3 OFF
Resets S3's sticky status to normal (unless SB ON has set the global
sticky flag).
Remarks: Normally, ASDT32 expends a great deal of energy to determine whether
it should stop on a 'CC'x that has been encountered. Depending on
the current PID and TID that were in effect when you set a
breakpoint, ASDT32 tries to determine if it should stop execution of
your program or yield control back to OS/2. However, if the global
sticky flag is on or if an individual breakpoint that is hit is
sticky, then ASDT32 knows to take control regardless of PID and TID
information.
Note: ASDT32 always considers physical address breakpoints to be
sticky. It defaults virtual and linear address breakpoints that
resolve above the 512M line to be sticky. You can change the sticky
status of these breakpoints by issuing SB Sn OFF when necessary.
ΓòÉΓòÉΓòÉ 12.50. SC - Screen ΓòÉΓòÉΓòÉ
Purpose: Replaces the ASDT32 full screen display with the user program
display.
Format: SC
Examples: SC
Displays the user program's screen and waits for any key to be
pressed.
Remarks: Since ASDT32 uses the display screen to communicate with you, it
saves your program's screen each time ASDT32 is entered and restores
that screen each time it returns control to your program. When
ASDT32 is active and you wish to view your screen instead of the
ASDT32 screen, enter the SC command. Pressing any key restores the
ASDT32 screen.
ASDT32 sets function key F6 to the SC command on entry.
ΓòÉΓòÉΓòÉ 12.51. SK - Set Keyboard Hot Key ΓòÉΓòÉΓòÉ
Purpose: Sets hot key monitoring by ASDT32.
Format: SK [= nn]
nn A 1-byte scan code that you want to be interpreted as
the hot key.
Examples: SK
ASDT32 monitors keystrokes when it is not in control to see if you
have typed the currently-defined hot key. This defaults to the
PrtSc key.
SK 4A
Defines the hot key to scan code 4A, which is the keypad minus.
Remarks: Subsequent hot key keystrokes return processor control to ASDT32.
The use of the keyboard hot key can be set at ASDT32 installation
time with the /K option. Setting this option causes ASDT32 (when it
is not in control) to monitor keystrokes searching for a hot key.
When your program is running and this option is set, a hot key will
return control to ASDT32.
Resetting this option with the RK command removes ASDT32's
monitoring of keystrokes.
ΓòÉΓòÉΓòÉ 12.52. SR - System Reset ΓòÉΓòÉΓòÉ
Purpose: Performs a system reset.
Format: SR
Examples: SR
Re-ipls the machine causing control to be given to the boot-strap
loader.
Remarks: This command is useful if you want a fresh power-on of the system
without turning the power switch off and on. Memory is not
rechecked, and it is cleared. ASDT32 does not regain control with
this command.
ΓòÉΓòÉΓòÉ 12.53. ST - Step ΓòÉΓòÉΓòÉ
Purpose: Executes a specified number of user program instructions.
Format: ST [= expr]
expr Any ASDT32 expression.
Examples: ST 4
Four user program instructions are executed.
Remarks: If the operand is null, the number of instructions executed defaults
to the value of the step count variable (CT).
Your display screen is restored, one user program instruction is
executed, the breakpoints are activated, and the remaining user
program instructions are executed. Program execution is terminated
by one of the interrupts ASDT32 handles, by a breakpoint, or by the
step count. The reason for termination is displayed with a message
or a breakpoint highlight.
Execution of your program always begins at the location pointed to
by CS:EIP.
The ASDT32 CT value is a 16-bit quantity. If your expression
evaluates to a higher precision than this, then ASDT32 displays a
warning message, leaves the CT value as is, and does not single step
any instructions.
ASDT32 sets function key F8 to the ST command on entry.
ΓòÉΓòÉΓòÉ 12.54. S1-S9 - Set Breakpoints S1-S9 ΓòÉΓòÉΓòÉ
Purpose: Sets the breakpoints that are displayed at the top left corner of
the ASDT32 display screen.
Each breakpoint is set via any of the four addressing schemes that
ASDT32 employs. It is displayed as an 8-higit address, an offset
from CS or CO, as an offset from some selector, or as "........" to
indicate that the breakpoint is null.
Format: Sn [= expr or ON or OFF]
n The S breakpoint to be manipulated.
expr Any ASDT32 expression.
ON Activates Sn as a breakpoint.
OFF Suspends Sn as a breakpoint.
Examples: S1 = 345C00
Sets the S1 breakpoint to linear address '345C00'x. If this address
is below or more than 4K above the CS and the CO, the breakpoint is
displayed as "00345C00."
S2 = CO + 4
Sets the S2 breakpoint to four bytes beyond the current code origin
address. The breakpoint is displayed as "$00000004."
S5 = CS:CX
Sets the S5 breakpoint to the current code segment plus the contents
of the CX register. The breakpoint is displayed with a leading "+"
if CX < 4K.
S8 OFF
Deactivates the S8 breakpoint.
Remarks: When a breakpoint is activated, the instruction at that address is
disassembled and displayed on the message line.
When any of the active breakpoints is encountered during the
execution of a user program, execution is stopped and control is
given to ASDT32. In addition to the nine S1-S9 breakpoints, the nine
V1-V9 variables may be used for address stops to provide a maximum
of eighteen address stops per screen. Since there are nine ASDT32
screens, a total of 162 address stops may be active at any given
time.
ASDT32 displays active breakpoints in a relative address format if
possible. A relative address is designated by "$" for CO, "+" for
CS, or "#" for any other selector when the breakpoint is not a
linear or physical address. "&" is used to denote a virtual 8086
mode breakpoint, which is neither a linear or physical address.
Linear address breakpoints have no designating character whereas
physical address breakpoints are designated by "!." The following
examples show how breakpoints are displayed under the various
conditions:
Command CO Setting CS Base Address CS Setting Resulting Display
S1=CO+200 78694000 775A1000 005B S1:$00000200
S5=CO-1A5 +0AE8 775A1000 005B S5:+00000943
S8=025900! null !00025800 005B S8:+00000100
S2=2D0003 3D590000 00100000 004F S2: 002D0003
S1=DS:4567 +5900 3D000000 001F S1:#00004567
S7=025900! null !003ABC00 005B S7:!00025900
ASDT32 highlights active breakpoints on the ASDT32 display screen.
Once you deactivate a breakpoint with an OFF operand, it remains
deactivated until it is reactivated with an ON operand.
Note: ASDT32 will not reactivate a breakpoint for a process or
thread that has terminated. This is due to the fact that every
breakpoint has a process id, a thread id, and an LDT associated with
it when it is set. You may deactivate and reactivate the breakpoint
while its associated information is still valid, but you can not
reactivate it once its thread has been terminated. If you want to
reactivate a screen's breakpoints and associate their addresses with
the current process id, thread id, and LDT, then issue a Dn ON
command. See D1-D9 - Select Display for more information.
Note: When in virtual 8086 mode, you will set segment:offset
breakpoints when you use virtual addressing schemes. Linear and
physical addressing schemes work the same as for protected mode.
A breakpoint command with a null operand sets the breakpoint to
null. For a virtual address breakpoint, ASDT32 may substitute a
symbol name in the breakpoint's display area. This assumes that the
breakpoint address corresponds to some symbol read in. Note that
code origin usage will override this substitution process; i.e., if
"$" is present in the breakpoint display area, ASDT32 will not
substitute the offset address with a symbol name.
A special form of breakpoint, the procedure step, is used to run an
entire module or section of code that is invoked with a CALL, INT,
or REP instruction. ASDT32 provides a procedure step function, which
uses S9 to set a breakpoint at the instruction following the one
about to be executed. If the instruction about to be executed is a
CALL, INT, or REP, the effect is for the entire module to be
executed. The command sequence is "S9 = EX+IL;EX;S9."
ASDT32 sets function key F9 to the procedure step command sequence
on entry.
You can change active breakpoints into complex breakpoints with the
CB command. See Setting Breakpoints and CB - Complex Breakpoint for
more information.
ΓòÉΓòÉΓòÉ 12.55. TI - Take Interrupt ΓòÉΓòÉΓòÉ
Purpose: Takes an ASDT32 interrupt from OS/2 for ASDT32's usage.
Format: TI = expr
expr Any ASDT32 expression that indicates which interrupt
you want ASDT32 to take from OS/2.
Examples: TI 2
ASDT32 takes control of interrupt 2 from OS/2.
TI D
ASDT32 takes control of interrupt '0D'x from OS/2.
Remarks: ASDT32 manipulates various interrupt vectors to gain control when
specific actions/exceptions occur. There are times when your device
driver needs to control one of these ASDT32 interrupts. By using
the RI command, you can have ASDT32 relinquish control of a specific
interrupt. By using the TI command, you can have ASDT32 regain
control of the specific interrupt.
See RI - Restore Interrupt for information on how to restore an
ASDT32 interrupt to OS/2.
ΓòÉΓòÉΓòÉ 12.56. TP - Terminate Process ΓòÉΓòÉΓòÉ
Purpose: Terminates the current process that ASDT32 is monitoring.
Format: TP
Examples: TP
ASDT32 terminates the current process (program) and returns to OS/2.
Remarks: TP allows you to end a process that ASDT32 has intercepted. This is
useful when a stack limit violation or a general protection fault
has caused ASDT32 to gain control.
ASDT32 can not terminate a process that is running at level 0.
ASDT32 will issue a warning message if you try to do this and will
not attempt to terminate the process. Additionally, if you issue TP
for a device driver that ASDT32 is monitoring during the
initialization phase, the system will hang.
ASDT32 sets function key F3 to the TP command on entry.
ΓòÉΓòÉΓòÉ 12.57. TS - Task State Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the TSR.
Format: TS [= expr]
expr Any ASDT32 expression.
Examples: TS = 2A
ASDT32 sets the task state register to '002A'x.
Remarks: The current TSR (task state register) is changed when you enter the
TS command. When you change the TSR, your program may not be able to
continue with the altered value.
ASDT32 uses only the least significant 16 bits that result from an
expression evaluation to set the TSR. ASDT32 truncates any
additional bits and displays a warning message.
The TS command with a null operand restores your program's TSR to
its original value. If you attempt to set the TSR to an invalid
value, ASDT32 will display a message and will not set the register.
ΓòÉΓòÉΓòÉ 12.58. T0 - Suspend/Reactivate Hardware Debug Registers ΓòÉΓòÉΓòÉ
Purpose: Suspends or reactivates the hardware debug registers (DR0-DR3).
Format: T0 [ON or OFF]
ON Reactivates all DRx that have settings.
OFF Suspends all DRx that have settings.
Examples: T0 OFF
Keeps DR0-DR3 disarmed upon exit from ASDT32.
T0 ON
Reactivates all of DR0-DR3 that have settings.
Remarks: If you reference the T1-T4 commands (see T1-T4 - Set Hardware Debug
Registers), you will notice that ASDT32 will deactivate your DR0-DR3
settings for various reasons that generally deal with the fact that
the PID under which you set DR0-DR3 has been switched out or
terminated. T0 ON will reactivate any suspended hardware debug
register setting and will associate the current PID with it.
ΓòÉΓòÉΓòÉ 12.59. T1-T4 - Set Hardware Debug Registers ΓòÉΓòÉΓòÉ
Purpose: Sets the hardware debug registers (DR0-DR3).
Each DRx is set by using the Tn command where n is 1-4 and x=n-1.
ASDT32 uses the information specified with the T1-T4 commands to
load DR0-DR3 and DR7 upon return to OS/2.
Format: Tn [= opnds or ON or OFF]
n The DRx register to be set (x=n-1); e.g., the T4
command sets DR3.
null ASDT32 retrieves information about DRx's current
setting and places this data on the command line for
review or editing.
opnds operands (addr,action,len,context,exact) that must
appear in this order. Only addr is required.
addr Any ASDT32 expression that defines the
address that you want DRx to monitor. A
virtual address will have ASDT32 calculate
the linear address.
Note: The hardware debug registers are
loaded with linear addresses. Hence,
ASDT32 will not accept a physical address
for the T1-T4 commands.
action I (breaks on instruction execution only),
W (breaks on data writes only), or R
(breaks on data reads or writes but not on
instruction fetches). The default action
is W.
len 1, 2, or 4 to specify the length of the
data item to be monitored. The hardware
requires that multiple-byte fields be
aligned on their proper boundaries. For
the I action, ASDT32 will force the length
byte to 1. The default length is 1 byte.
context G (global level) or L (local level). The
default context is global.
exact E (exact data breakpoint match) or ^ (for
inexact data breakpoint match). The Intel
processor slows the execution so that data
breakpoints are reported on the
instruction that causes them when the
exact option is indicated. The default is
exact.
ON Reactivates DRx.
OFF Suspends DRx.
Examples: T1 5F:0245,I
Sets DR0 to stop on instructions referenced at the corresponding
linear address (to which 5F:0245 resolves).
T2 123456,R,2,G,^
Sets DR1 to stop on data reads/writes from/to this linear address
without the exact option.
T3 OFF
Deactivates DR2.
T1
Places the current settings associated with DR0 on the ASDT32
command line for review or editing.
Remarks: In general, ASDT32 is allowing you to set the hardware debug
registers as mentioned in the Intel 80386 Programmer's Reference.
You should acquaint yourself with this reference guide before using
the T1-T4 commands.
The hardware automatically resets the local enable bits of DR7 at
every task switch to avoid unwanted breakpoint conditions in the new
task. However, OS/2 does not implement hardware task switching.
Hence, ASDT32 does the best it can to determine when a hardware
debug register is "truly" hit for your settings; i.e., if you use
local context, ASDT32 looks to see if the current PID matches the
one that was in effect when you set DRx. If the PIDs do not match,
ASDT32 disables the local context DRx, and returns control to OS/2.
Note: Global context means that ASDT32 will not check DRx's PID.
ASDT32 just assumes that you always want the trap. The same holds
true for all linear address DRx settings above the 512M line. Even
so, ASDT32 will deactivate a DRx with a global context if it
determines that the address does not involve code above the 512M
line and its PID has been killed.
See T0 - Suspend/Reactivate Hardware Debug Registers for a method
that allows you to suspend or reactivate all 4 DR0-DR3 registers at
once.
ΓòÉΓòÉΓòÉ 12.60. UM - User Mask ΓòÉΓòÉΓòÉ
Purpose: Displays and optionally sets the interrupt controller mask while
ASDT32 has processor control.
Format: UM [= value]
value The interrupt mask value (must evaluate to '00'x
through 'FF'x).
Examples: UM
Displays the current ASDT32 mask for the 8259 interrupt levels.
UM BC
Sets the user mask to 'BC'x, which allows only the keyboard and
diskette interrupts while ASDT32 has control (assuming that these
interrupts were not disabled by your program).
Remarks: ASDT32 will not let you set a value which disables the keyboard.
When ASDT32 gets control, ASDT32 saves the current interrupt mask
register (I/O port '21'x). It then ORs the value you select with the
current mask.
Note: This means you cannot enable interrupts in ASDT32 that were
disabled in your program.
ASDT32 initializes the user mask to '00'x. You can specify another
initial value for ASDT32 with the /U=nn parameter used by ASDT32
during installation (nn represents the byte that you want to serve
as the user mask).
The UM command allows you to specify which 8259 interrupt levels are
to be masked off while in ASDT32. However, when ASDT32 returns
control to your program (via the EX, HT, ST, and TP commands), it
restores the previously saved interrupt mask register value.
Because of the complex nature of this command, only those familiar
with 8259 interrupt levels and operation should use it.
ΓòÉΓòÉΓòÉ 12.61. VR - Version ΓòÉΓòÉΓòÉ
Purpose: Displays the ASDT32 version number and release date.
Format: VR
Examples: VR
Displays the version number and release date for the ASDT32 that you
have installed.
Remarks: To support OS/2 3.0, some information had to be removed from the
ASDT32 screen. The least painful to squirrel away was the release
information. You can now view this data via the VR command.
ΓòÉΓòÉΓòÉ 12.62. VW - IDT Window ΓòÉΓòÉΓòÉ
Purpose: Switches to IDT Window Mode.
Format: VW
Examples: VW
ASDT32 switches the edit portion of the ASDT32 display to an IDT
window and sets the primary window mode to IDT.
Remarks: The IDT window displays descriptor table entries in a decoded,
readable format. Each table entry line displays one descriptor table
entry.
ASDT32 displays the primary window at the beginning of line 8 on the
ASDT32 screen. The IDT window is not editable, but you can scroll
the entries displayed. See Moving on the Command Line for a listing
of the command line scrolling keys and their function. See NW - Next
Window for the NW command, which switches among all types of ASDT32
windows.
ΓòÉΓòÉΓòÉ 12.63. V1-V9 - Set Variables V1-V9 ΓòÉΓòÉΓòÉ
Purpose: Sets the scratch pad/breakpoint variables that are displayed only on
the ASDT32 CB display screen.
Each breakpoint is set via any of the four addressing schemes that
ASDT32 employs. It is displayed as an 8-higit address, an offset
from CS or CO, as an offset from some selector, or as "........" to
indicate that the breakpoint is null.
Format: Vn [= expr or ON or OFF]
n The V breakpoint to be manipulated.
expr Any ASDT32 expression.
ON Activates Vn as a breakpoint.
OFF Suspends Vn as a breakpoint.
Examples: V1 = CS:EIP + 2B8
Adds '02B8'x to the current program counter and places the result in
the V1 variable.
V2 = V1 + AX
Places the sum of the contents of variable V1 and the AX register
into the V2 variable.
V5 = CO:CX;V5 ON
Sets the V5 breakpoint to the current code origin plus the contents
of the CX register and activates the breakpoint. The breakpoint is
displayed with a leading "$" if CX is < 4K.
Remarks: Since these variables are not displayed on the primary screen,
ASDT32 shows you a confirmation message indicating the variable name
and value each time one of these variables is set.
V1 = 111111 + 222222
produces the confirmation message
V1 = 333333
In order to display the contents of one of these variables, you can
copy the variable into itself to produce a confirmation message
(V8=V8).
At times, it may be useful to use one or more of the V1-V9 variables
as address stops (breakpoints). ASDT32 displays active breakpoints
in a relative address format if possible. A relative address is
designated by "$" for CO, "+" for CS, or "#" for any other selector
when the breakpoint is not a linear or physical address. "&" is used
to denote a virtual 8086 mode breakpoint, which is neither a linear
or physical address.
Linear address breakpoints have no designating character whereas
physical address breakpoints are designated by "!."
The default state for the V breakpoints is inactive. See Setting
Breakpoints and S1-S9 - Set Breakpoints S1-S9 for more information.
Note: ASDT32 highlights active V1-V9 breakpoints on the ASDT32 CB
display screen. See CB - Complex Breakpoint for details on how to
view your V1-V9 variables. Once you activate a variable with an ON
operand, it remains activated until it is deactivated either with an
OFF operand or by being set to null.
Note: ASDT32 will not reactivate a breakpoint for a process or
thread that has terminated. This is due to the fact that every
breakpoint has a process id, a thread id, and an LDT associated with
it when it is set. You may deactivate and reactivate the breakpoint
while its associated information is still valid, but you can not
reactivate it once its thread has been terminated. If you want to
reactivate a screen's breakpoints and associate their addresses with
the current process id, thread id, and LDT, then issue a Dn ON
command. See D1-D9 - Select Display for more information.
Note: When in virtual 8086 mode, you will set segment:offset
breakpoints when you use virtual addressing schemes. Linear and
physical addressing schemes work the same as for protected mode. For
a virtual address breakpoint, ASDT32 may substitute a symbol name in
the breakpoint's display area. This assumes that the breakpoint
address corresponds to some symbol read in. Note that code origin
usage will override this substitution process; i.e., if "$" is
present in the breakpoint display area, ASDT32 will not substitute
the offset address with a symbol name.
A breakpoint command with a null operand sets the breakpoint to
null.
You can change active breakpoints into complex breakpoints with the
CB command. See Setting Breakpoints and CB - Complex Breakpoint for
more information.
ΓòÉΓòÉΓòÉ 12.64. WA - Window Assumptions ΓòÉΓòÉΓòÉ
Purpose: Causes ASDT32 to make assumptions about the selector used for
setting the window, breakpoint, and CO variables during assignment
commands.
Format: WA [ON or OFF]
Examples: WA ON
Causes ASDT32 to use window assumptions.
WA OFF
Causes ASDT32 to stop using window assumptions.
Remarks: Window assumptions affect assignments to the window, breakpoint, and
CO variables. Some examples follow that result when ASDT32 is using
window assumptions:
CO 35 - CO gets CS:35
S8 12345678 - S8 gets CO+12345678 or CS:12345678 depending on
whether the code origin is set
L1 EIP - L1 gets CS:EIP if CO is null
L1 LC - L1 gets CO+LC if CO is set
Note: If you specify a source constant or variable that consists of
a selector and an offset, ASDT32 will use that selector and offset.
The /W option causes ASDT32 to use window assumptions, too.
ΓòÉΓòÉΓòÉ 12.65. WI - What is Address ΓòÉΓòÉΓòÉ
Purpose: Matches an address to its corresponding symbol (if found).
Format: WI addr
addr any ASDT32 expression that determines a selector:offset
address that you wish to check for a symbol match.
Examples: WI CS:500
Displays the name of a symbol on the message line if the address
matches that of any symbol.
Remarks: WI is the inverse function of specifying a symbol name on the
command line. This is useful to poll any given virtual address to
see if it matches up with some symbol.
Each symbol that could match up with the specified address needs to
have its segment number qualified. If you do not qualify a segment
number, ASDT32 defaults all segment numbers to be qualified by 0
(the null selector). ASDT32 will try to guess what selector should
be associated with a zero-qualified segment using segment length
data located in the LDT and GDT entries. This procedure is not
guaranteed to succeed. Hence, when it fails, you should qualify the
segment number via the QS command. See QS - Qualify Segment Number
for information about qualifying a segment number.
ΓòÉΓòÉΓòÉ 12.66. XS - Extra Selector Register ΓòÉΓòÉΓòÉ
Purpose: Alters the contents of the extra selector register variable.
Format: XS [= expr]
expr Any ASDT32 expression.
Examples: XS = 1C42
Places the value '1C42'x into the XS variable.
XS = CS
Copies the contents of the CS register into the XS variable.
Remarks: To save and restore selector register contents, use the XS segment
register variable. ASDT32 treats XS just like a real selector
register.
ASDT32 uses only the least significant 16 bits that result from an
expression evaluation to set the XS variable. ASDT32 truncates any
additional bits and displays a warning message.
A null operand sets the XS variable to zero.
ΓòÉΓòÉΓòÉ 13. ASDT32 Messages ΓòÉΓòÉΓòÉ
This section describes all of the messages that may appear on the ASDT32
display screen message line. A message either indicates that an action was
taken or describes an error that has occurred.
If you have trouble understanding an error or what action to take in response
to an error, refer to the appropriate command in ASDT32 Command Reference.
Messages are listed by subject.
ΓòÉΓòÉΓòÉ 13.1. General Messages ΓòÉΓòÉΓòÉ
ADDRESSED PAGE IS NOT PRESENT You are trying to use a (resolved) linear
address whose corresponding page is not present. Hence, ASDT32 can not
complete the command.
ASDT32 VERSION x.x mm/dd/yy The VR command lists the current version and
release date for ASDT32.
BREAKPOINT(S) DEACTIVATED ASDT32 deactivated at least one breakpoint. This
usually happens due to the fact that some process or thread has terminated,
and ASDT32 can no longer track breakpoints with that process or thread.
COMMAND "xx" NOT RECOGNIZED The command you issued is not a valid ASDT32
command.
DOUBLE FAULT WON'T ALLOW THIS The command you issued is not legal once ASDT32
has captured a double fault. This is largely due to the fact that the
machine and the operating system are not trustworthy at this point.
INVALID SELECTOR SPECIFIED The selector you have specified for some ASDT32
command is invalid.
INT '51'X Your program generated a protected-mode interrupt '51'x. ASDT32
uses this special interrupt to get keystrokes.
LDT BASE ADDRESS HAS CHANGED You tried to execute an ASDT32 command that
requires the LDT to be what it was upon entry.
SYMFILE NOT ENTIRELY READ IN ASDT32 has a 192KB limit on the total number of
bytes it will read in for a symbol file.
ΓòÉΓòÉΓòÉ 13.2. Invocation Messages ΓòÉΓòÉΓòÉ
DIVIDE-BY-ZERO INTERRUPT (0) ASDT32 gained control via a divide by zero
interrupt. This usually indicates an error in your program, but does not
necessarily indicate a division error.
ERROR READING PROFILE: xxxxxxx ASDT32 failed when it tried to read in a
profile due to some specification by you in the CONFIG.SYS file.
GENERAL PROTECTION FAULT xxxx ASDT32 gained control because an INT '0D'x
occurred. This indicates that there was a general protection fault. The
error code is shown and is retained in the ASDT32 variable, EC.
HOT KEY INTERRUPT ASDT32 gained control because you typed the currently
defined hot key. The hot key yields control to ASDT32 if you have issued an
SK command or if you invoked ASDT32 with the /K option.
INVALID OPCODE INTERRUPT (6) ASDT32 gained control because an invalid opcode
was detected by the execution unit or the type of operand is invalid for the
given opcode.
NMI SWITCH INTERRUPT (2) ASDT32 gained control due to an INT 2 being issued.
This usually means that you hit the NMI switch.
PARAMETER UNRECOGNIZED: /x ASDT32 did not recognize an invocation parameter
that you specified in the CONFIG.SYS file.
SINGLE STEP TRAP INTERRUPT (1) ASDT32 gained control because the trap flag
(TF) was set while the processor was executing an instruction. You may clear
this flag with the TF command and continue if desired.
STACK LIMIT VIOLATION ASDT32 gained control because an INT '0C'x occurred.
This indicates that the stack limit was violated.
386 DEBUG REGISTER TRAP (DRn) ASDT32 gained control because the 80386 hardware
debug register n signalled an event.
ΓòÉΓòÉΓòÉ 13.3. Expression Evaluation Messages ΓòÉΓòÉΓòÉ
CAN'T CONVERT ADDR TO PHYSICAL You have changed the linear base address of the
LDT (using the LD command), and you are now trying to convert some address
to its corresponding physical address. ASDT32 assumes that you want to know
the physical address relative to the LDT that you are investigating, and
ASDT32 can not convert the address because the associated data has been
swapped out from physical memory.
COULDN'T FIND SPECIFIED SYMBOL The symbol name specified was not matched in
the symbol file read in.
EXPRESSION CAUSES OVERFLOW Your expression requires more precision than ASDT32
provides.
PHYSICAL ADDRESS NOT ALLOWED You have tried to convert a physical address to
another form of address. ASDT32 does not allow this.
SEGMENT NUMBER MUST BE < 257 ASDT32 currently supports LNK386 map segment
numbers 1-256.
SYMBOLS WERE NOT READ IN You have tried to use a symbol name (via the trigger
'@'), and no symbol file was read in by ASDT32.
UNRECOGNIZED OPERAND: xxxxxxxx A term in the command expression you entered
is not valid.
WARNING: OPERAND TRUNCATED This message warns you that the operand you
specified is too large to fit in the target register or variable. ASDT32
fits as much as possible and truncates the rest.
ΓòÉΓòÉΓòÉ 13.4. "CA" Command Messages ΓòÉΓòÉΓòÉ
UNRECOGNIZED OPERAND: xx A term in the operand expression you entered is not
valid. Either you incorrectly specified the type of attribute that you
wanted set (must be one of N, F, H, or R), or you gave an invalid value for
the attribute.
ΓòÉΓòÉΓòÉ 13.5. "CB" Command Messages ΓòÉΓòÉΓòÉ
BREAKPOINT IS NOT ACTIVE You attempted to set a complex breakpoint when that
breakpoint was inactive. Activate or set the breakpoint address before
setting up the complex condition and count.
BREAKPOINT IS NOT COMPLEX You have requested to see the complex definition of
a particular breakpoint, but that breakpoint is not complex.
BREAKPOINT NOT RECOGNIZED The complex breakpoint you have attempted to set is
not a valid breakpoint.
COMPLEX BREAKPOINT DEACTIVATED A complex breakpoint's occurrence count has
matched the count, and ASDT32 has taken the breakpoint. ASDT32 deactivates
the breakpoint.
CONDITION MUST BE < 16 CHARS ASDT32 limits a complex condition field to 15
characters.
COUNT FIELD EXPRESSION INVALID You have specified an unrecognized ASDT32
expression for the count field.
OCCURRENCE COUNT = xx ASDT32 displays the complex condition and count for the
breakpoint you requested.
SYNTAX: CB SX CONDITION,COUNT ASDT32 displays the syntax for the command.
VALID OPERATOR NOT FOUND ASDT32 expects one of the following logical operators
for a complex condition: <, >, =, <=, >=, or <>.
1ST EXPRESSION IS INVALID You have requested an unrecognized ASDT32 expression
for the left half of the complex breakpoint condition.
2ND EXPRESSION IS INVALID You have requested an unrecognized ASDT32 expression
for the right half of the complex breakpoint condition.
ΓòÉΓòÉΓòÉ 13.6. "CG" Command Messages ΓòÉΓòÉΓòÉ
USING REMOTE TERMINAL ASDT32 is using the remote terminal display because this
configuration has been selected.
USING SINGLE SCREEN ASDT32 is using the primary display because the remote
terminal configuration has been reset.
ΓòÉΓòÉΓòÉ 13.7. "CM" Command Messages ΓòÉΓòÉΓòÉ
INVALID ADDRESSING EXPRESSION One of the two memory addressing expressions is
not acceptable to ASDT32.
LENGTH FIELD EVALUATES TO 0 You have specified an ASDT32 expression for the
length field that evaluates to 0. Hence, the command is not executed.
SEGMENT LIMIT WILL BE VIOLATED A segment limit violation will occur if ASDT32
compares the two memory blocks for the length that you have specified.
SYNTAX: CM ADDR1,ADDR2,LENGTH ASDT32 displays the syntax for the command.
xxx OF xxxxx MISMATCHES ASDT32 is comparing the two memory blocks and is
displaying as much of the two blocks as possible. The number of mismatches
shown on the screen and the total number of mismatches are displayed.
ΓòÉΓòÉΓòÉ 13.8. "CP" Command Messages ΓòÉΓòÉΓòÉ
INVALID ADDRESSING EXPRESSION One of the two memory addressing expressions is
not acceptable to ASDT32.
LENGTH FIELD EVALUATES TO 0 You have specified an ASDT32 expression for the
length field that evaluates to 0. Hence, the command is not executed.
SEGMENT LIMIT WILL BE VIOLATED A segment limit violation will occur if ASDT32
copies the memory block to the indicated destination for the length that you
have specified.
SYNTAX: CP ADDR1,ADDR2,LENGTH ASDT32 displays the syntax for the command.
ΓòÉΓòÉΓòÉ 13.9. "DK" Command Messages ΓòÉΓòÉΓòÉ
FUNCTION KEY BUFFER IS FULL You have exceeded the amount of space ASDT32 has
set up for commands associated with function keys. The total amount of space
for function key commands is 800 bytes.
KEY IS NOT DEFINED You pressed a function key that has not been defined. No
action was taken by ASDT32.
KEY "xxxxx" DEFINED The function key definition you specified was added to the
list of function keys.
KEY "xxxxx" DEFINITION REMOVED The function key definition you specified was
removed from the list of function keys.
ΓòÉΓòÉΓòÉ 13.10. "DW," "MW," "LW," and "VW" Command Messages ΓòÉΓòÉΓòÉ
INVALID DESCRIPTOR You tried to use L1-M6 as a source variable while you were
in an LDT/GDT or IDT window, and the descriptor that was referenced is not
valid.
OPERAND NOT ALLOWED ASDT32 does not allow an LDT/GDT or IDT secondary window.
ΓòÉΓòÉΓòÉ 13.11. "EP" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 PROFILE WAS NOT READ IN No profile was read in during the
initialization phase. Hence, the EP command can not be executed.
COMMAND TOO LONG - ABORTED A command in the specified profile is too long to
fit on ASDT32's command line.
PROFILE NOT ENTIRELY READ IN ASDT32 has a limit on the total number of bytes
it will read in for a profile during the initialization phase. If your
profile contains more than 1600 bytes, it will be truncated.
ΓòÉΓòÉΓòÉ 13.12. "ET" Command Messages ΓòÉΓòÉΓòÉ
ET COMMAND REQUIRES AN OPERAND This command requires a breakpoint expression
as an operand.
XXXXXXXXXX MICROSECONDS TAKEN The elapsed time interval is reported to you in
microseconds.
ΓòÉΓòÉΓòÉ 13.13. "EX" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 CAN NOT SINGLE STEP This message informs you that ASDT32 can not single
step the current instruction taken as CS:EIP. Generally, this implies that
you changed either the CS or EIP register such that ASDT32 can not resume
your program. ASDT32 single steps the first instruction before it EXecutes
your program so that you do not spin on a breakpoint.
EX COMMAND ALLOWS NO OPERANDS You specified an operand with the EX command,
and ASDT32 will not allow operands to be used with the EX command.
ΓòÉΓòÉΓòÉ 13.14. "F," "FA," "FC," "FE," and "FX" Command Messages ΓòÉΓòÉΓòÉ
STRING xxxxxxxx NOT FOUND The search string you requested could not be found.
xxxxxxxx FOUND AT xxxxxxxx The search string you requested was found at the
memory location displayed at the right.
* OR SELECTOR EXPR REQUIRED You have a "," delimiter, which indicates the need
for either a following "*" (task search indicator) or ASDT32 selector
expression (for a single segment search).
ΓòÉΓòÉΓòÉ 13.15. "HT" and "RT" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 CAN NOT RESUME THE THREAD ASDT32 can not resume a halted thread because
that thread has terminated or ASDT32 could not locate the process in
question.
CS:EIP DOES NOT ALLOW FOR HALT The current CS:EIP locates an instruction that
is invalid. Usually, this means that the linear address is not mapped.
Occasionally, it means that there is only one byte left for the segment, and
the HT command needs two bytes for the J * opcode and operand.
HT COMMAND ALLOWS NO OPERANDS You specified an operand with the HT command,
and ASDT32 will not allow operands to be used with the HT command.
NO HALTING AT A BREAKPOINT ASDT32 will not allow you to halt a thread at a
breakpoint. This is due to the fact that ASDT32 inserts your breakpoints
for you before it halts the thread.
NO THREADS CURRENTLY HALTED ASDT32 can not resume any threads because none are
halted.
PID SPECIFIED IS NOT FROZEN ASDT32 can not resume a specific thread of the
process id (PID) that you specified because it did not halt a thread of that
particular PID.
TOO MANY THREADS HALTED ASDT32 currently allows only ten threads to be halted
at the same time.
ΓòÉΓòÉΓòÉ 13.16. "IB," "IW," "OB," and "OW" Command Messages ΓòÉΓòÉΓòÉ
VALUE xxxx OUTPUT TO PORT xxxx This message lists the port to which you wrote
data and the value of that data.
VALUE xxxx READ FROM PORT xxxx This message listed the port from which you
read data and the value of that data.
ΓòÉΓòÉΓòÉ 13.17. "LD" Command Messages ΓòÉΓòÉΓòÉ
INVALID DESCRIPTOR You tried to use an index that referenced a descriptor that
is not a valid LDT descriptor.
INVALID LDT BASE ADDRESS You tried to alter the current LDT base address to a
linear address that is not the start of a valid LDT.
PHYSICAL ADDRESS NOT ALLOWED You can not set the base address of the current
LDT to a physical address. ASDT32 allows linear base addresses for this
command.
ΓòÉΓòÉΓòÉ 13.18. "L1-M6" and "M7-M9" Command Messages ΓòÉΓòÉΓòÉ
CAN'T SET "xx" IN THIS WINDOW You have a split disassembly/memory window and
have tried to set a second window segment in the secondary window. ASDT32
allows only one secondary window segment (e.g., one memory window in
disassembly mode).
Mx = xxxxxxxx ASDT32 has set the contents of the displayed variable as shown
(e.g., M7 = 99903A65 or Mx = 1234:908DC9AF).
PHYSICAL ADDRESS NOT ALLOWED You can not set a line variable in the page
window to a physical address. ASDT32 allows linear base addresses for these
commands when the page window is displayed.
ΓòÉΓòÉΓòÉ 13.19. "NP" Command Messages ΓòÉΓòÉΓòÉ
CS:EIP DOES NOT ALLOW FOR NP The current CS:EIP locates an instruction that
dose not allow ASDT32 to page in memory. ASDT32 pages in memory by
referencing said memory in your instruction stream. This is accomplished
via a LB opcode and a single step that is transparent to you. If the
current instruction does not allow for this transaction, ASDT32 can not page
in memory.
ENVIRONMENT WILL NOT PERMIT NP ASDT32 can not page in memory while you are
currently running at level 0.
INVALID ADDRESSING EXPRESSION The address that you specified is not acceptable
to ASDT32.
NP COMMAND REQUIRES AN OPERAND This command requires an address expression as
an operand.
PAGE IS ALREADY PRESENT The address that you specified yields a page that is
already in memory.
PHYSICAL ADDRESS NOT ALLOWED You have specified a physical address to be paged
in. This makes no sense to ASDT32 as the address specified must be virtual
or linear.
ΓòÉΓòÉΓòÉ 13.20. "PD and PM" Command Messages ΓòÉΓòÉΓòÉ
PRINT CANCELLED DUE TO ERROR ASDT32 detected a problem with the printer. The
printing operation has been terminated.
SEGMENT LIMIT WOULD OVERFLOW A segment limit violation would occur if ASDT32
prints the disassembly or memory block for the length that you have
specified.
UNRECOGNIZED OPERAND xx The comport number entered is invalid.
ΓòÉΓòÉΓòÉ 13.21. "PI" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 CAN NOT LOCATE THE PATH ASDT32 can not find the current thread's
invocation path. This happens most often with device drivers during the
initialization phase.
BREAKPOINT IS NOT SET The breakpoint you have attempted to use as a parameter
to the PI command is valid, but it has no value associated with it. Hence,
it has no process or thread associated with it either.
BREAKPOINT NOT RECOGNIZED The breakpoint you have attempted to use as a
parameter to the PI command is not valid.
C:\TEST\BIN\TEST.EXE This is an example of a successful program identification
by ASDT32.
ΓòÉΓòÉΓòÉ 13.22. "PR" Command Messages ΓòÉΓòÉΓòÉ
PRINT CANCELLED DUE TO ERROR ASDT32 detected a problem with the printer. The
printing operation has been terminated.
ΓòÉΓòÉΓòÉ 13.23. "QS" Command Messages ΓòÉΓòÉΓòÉ
QS COMMAND REQUIRES AN OPERAND This command requires a segment number
expression.
SEGMENT NUMBER MUST BE < 257 ASDT32 currently supports LNK386 map segment
numbers 1-256.
SEGMENT NUMBER OF 0 NOT ALLOWED ASDT32 currently supports LNK386 map segment
numbers 1-256.
SEGMENT NUMBER QUALIFIED AS xxxx ASDT32 shows the value of the selector which
qualifies the specified segment number.
SYMBOLS WERE NOT READ IN You have tried to qualify a segment number, but no
symbol file was read in by ASDT32.
ΓòÉΓòÉΓòÉ 13.24. "RI" and "TI" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 ALREADY HAS THE INTERRUPT You are trying to take an interrupt for
ASDT32 that it already owns.
ASDT32 DOESN'T OWN THE INTERRUPT ASDT32 is not the current owner of the
interrupt that you wish to restore to OS/2.
ASDT32 DOESN'T USE THE INTERRUPT The operand you specified does not indicate
an interrupt that ASDT32 uses.
IDT ENTRY IS NOT A TASK GATE You are trying to have ASDT32 take over the
double fault interrupt, and the current descriptor in the IDT does not
describe a task gate. ASDT32 requires that the descriptor describe a task
gate.
RI(TI) COMMAND REQUIRES AN OPERAND Both of these commands require a specified
interrupt as an operand.
ΓòÉΓòÉΓòÉ 13.25. "RK" and "SK" Command Messages ΓòÉΓòÉΓòÉ
HOT KEY HAS BEEN DISABLED ASDT32 will no longer monitor keystrokes for a hot
key.
HOT KEY DEFINED AS 'nn'X The hot key has been set as the scan code nn.
ΓòÉΓòÉΓòÉ 13.26. "SB" Command Messages ΓòÉΓòÉΓòÉ
BREAKPOINT IS NOT ACTIVE You attempted to set a breakpoint as sticky or as not
sticky and it is inactive. Activate or set the breakpoint address before
trying to change its sticky status.
BREAKPOINT NOT RECOGNIZED The breakpoint that you wish to make sticky is not a
valid breakpoint.
SB COMMAND REQUIRES AN OPERAND You have not specified an operand for the SB
command, and it requires one.
ΓòÉΓòÉΓòÉ 13.27. "SC" Command Messages ΓòÉΓòÉΓòÉ
PRESS ANY KEY TO RETURN This message informs you that you are viewing your
program's display screen. Pressing any key will return to the ASDT32 screen.
This message occurs only when your display screen is not the same as the one
for ASDT32.
ΓòÉΓòÉΓòÉ 13.28. "ST" Command Messages ΓòÉΓòÉΓòÉ
ASDT32 CAN NOT SINGLE STEP This message informs you that ASDT32 can not single
step the current instruction taken as CS:EIP. Generally, this implies that
you changed either the CS or EIP register such that ASDT32 can not resume
your program.
ΓòÉΓòÉΓòÉ 13.29. "S1-S9" and "V1-V9" Command Messages ΓòÉΓòÉΓòÉ
Sx: INVALID AS A BREAKPOINT ASDT32 can not set the breakpoint at the address
that you have specified. Check to see that the address uses a valid
selector and that the offset falls within the selector's segment limit
(assuming that this is a virtual address). Additionally, check to see that
you are not trying to reactivate a breakpoint whose thread or process has
terminated.
Sx: xxxxxxxxxxxx The indicated breakpoint has been activated. The string shown
is the disassembled instruction at the breakpoint.
ΓòÉΓòÉΓòÉ 13.30. "TP" Command Messages ΓòÉΓòÉΓòÉ
ENVIRONMENT WILL NOT PERMIT TP ASDT32 can not terminate the process if it is
currently running at level 0.
ΓòÉΓòÉΓòÉ 13.31. "T0-T4" Command Messages ΓòÉΓòÉΓòÉ
ADDRESS NOT ALIGNED FOR LENGTH The T1-T4 command address that you have
specified does not match its corresponding field length. 2-byte fields must
be aligned on word boundaries, and 4-byte fields must be aligned on
doubleword boundaries.
HARDWARE REGISTER NOT ACTIVE You are attempting to use one of the T1-T4 (null)
commands for editing purposes, and Tn is not active.
INSUFFICIENT SPACE FOR Tn NULL You are attempting to use one of the T1-T4
(null) commands for editing purposes, and you have not left enough room on
the ASDT32 command line for Tn's parameter display.
PHYSICAL ADDRESS NOT ALLOWED You have specified a physical address for the
T1-T4 registers. DR0-DR3 require a linear address, and ASDT32 will not
convert a physical address to a linear address.
T0 COMMAND REQUIRES AN OPERAND You are attempting to use the T0 command
without an operand. It requires either ON or OFF.
ΓòÉΓòÉΓòÉ 13.32. "UM" Command Messages ΓòÉΓòÉΓòÉ
INTERRUPT CONTROLLER MASK = xx ASDT32 has read the contents of the interrupt
controller mask register.
INVALID SETTING - KEYBD MASKED You attempted to set the interrupt mask to a
value which masks off the keyboard. ASDT32 does not allow this.
ΓòÉΓòÉΓòÉ 13.33. "WI" Command Messages ΓòÉΓòÉΓòÉ
NO CORRESPONDING SYMBOL FOUND You have tried to find a symbol name that
matches the specified address, but ASDT32 could not locate one that
corresponds.
SYMBOLS WERE NOT READ IN You have tried to find a symbol name that matches the
specified address, but no symbol file was read in by ASDT32.
WI COMMAND REQUIRES AN OPERAND This command requires a virtual address
expression.