home *** CD-ROM | disk | FTP | other *** search
-
- b r a n d X S Y M B O L I C D E B U G G E R
- version 2.1
-
- by Sonam G Gyato
-
-
- INTRODUCTION:
-
- This program is a full-screen software debugger for the IBM
- PC/XT series of personal computers. Even though it has been
- specifically written for these machines, it will also work on
- others that are 100% compatible.
-
- This release supports both the MONOCHROME (MDA) and the COLOR
- GRAPHICS (CGA) display adaptors (not the EGA). For example,
- you can trace through a graphics program, a pixel at a time.
- bXd is able to do this by trapping the BIOS video calls found in
- the IBM machines. Therefore, it is very important for non-IBM
- users, that your computer's BIOS routines be very similar to
- that of IBMs.
-
- For proper operation, it is important that all video related
- calls go via DOS or BIOS routines. In the case of the CGA
- users, bXd screen always uses memory locations BB00:0 to BBFF:F
- (in 80x25 text modes, this is the last of the four display
- pages). Therefore you can write to the screen directly for the
- first three pages, but for the last one you have to go via DOS
- or BIOS routines.
-
- Some of the other major features of this program are
- - Hardware Reset Switch
- This gives the user the ability to trap any runaway program
- dead in its track. It is really of great help.
-
- - Specify addresses by symbolic names
- bXd supports symbolic names by reading in files generated
- by your linker. Two formats are supported. One of them
- being the format generated by the MSDOS linker.
-
- - Online HELP
- Detailed help on the different commands are available.
- First time users are encouraged to go through them all
- atleast once.
-
- When developing a new product, one of the biggest problems faced
- by designers is the balance between the ability and the
- complexity of the program. Make it simple to use...it has
- little power, make it powerful...it becomes difficult to use.
-
- I hope that users will find out that I have followed the middle
- road. Even though this program will be used by mostly computer
- literate people, I have made the program easy to learn and use.
- At the same time, it has commands powerful enough to debug
- programs easily.
-
-
-
- LOADING bXd:
-
- Below is the format of invoking bXd from the DOS prompt.
-
- A>bXd [userprog[.COM]] [user_arguments] [<userCON.txt]
-
- 1. The first argument is the optional name of the program to be
- debugged. If no extension is given, then a COM file is
- assumed. In the case of EXE files, you have to specify the
- extension explicitly.
-
- If a filename is given, then bXd tries to load the symbol
- file associated with it.
- More on the symbol file format later.
-
- 2. The second set of arguments is what will be passed to your
- program as its command line. This text is found at offset
- 81H in your programs PSP (read DOS tech manual for more
- information on PSPs).
-
- 3. The last argument enables you to redirect the input and
- output to another device besides the console. This might be
- of some help if you're debugging a program that expects
- input from DOS console i/o routines.
-
-
- EX: A>bXd userprog
-
- In the above case, bXd will load the file <USERPROG.COM> and
- try to load the symbol file. After that it will print the
- status of the file loading procedure (whether the file was
- found or not...etc) and then prompt you will "press any
- key."
-
- After pressing a key, then the bXd debug screen will be
- displayed.
-
-
-
-
- SCREEN FORMAT:
-
- The bXd screen is divided into 6 different windows.
-
-
- +------------------------------------------+
- | DATA |
- +-----------------------+------------+-----+
- | CODE | REGISTER | |
- | | +-----+
- | | |STACK|
- | | | |
- +-----------------------+------------+-----+
- | USER | CURNT WINDOW HELP|
- +-----------------------+------------------+
-
- USER
- This is the window from which all commands are issued. There
- are two ways to give the commands -
- - Command Line Input
- this is the method implemented by most debuggers. You
- type in a line consisting of a command identifier
- alphabet and optional arguments.
- - Single Key Input
- the second method is via special keys like the
- function and cursor keys.
-
- CODE
- The program code is disassembled in this window. You can
- scroll the information from the USER window with the cursor
- keys.
-
- REGISTER
- The current user register values are displayed here. All the
- values are in hex.
-
- DATA
- Memory is displayed in this window in both hex-ascii and
- ascii format. You can scroll the information from the USER
- window with the <cntrl-PgUp> and <cntrl-PgDn> keys.
-
- STACK
- The current values pointed to by the STACK POINTER (SP)
- register is displayed. The value at the bottom it the word
- pointed to by SS:SP and all the values above it are the
- contents of successive memory locations.
-
- CURRENT WINDOW HELP
- This window displays a brief HELP text on the current
- window. The current window is the window in which the cursor
- is positioned. The default is the USER window.
-
-
-
- COMMANDS
-
- There is online HELP available on all the commands. From the USER
- window, press function key FK1. Pressing that key, will display
- the HELP menu in the CODE window. Using the CURNT WINDOW HELP,
- you can get help on all the commands.
-
- Single Key Input Commands:
-
- FK1 Display the HELP menu.
-
- FK2 Display the current user screen.
- This is the screen to which all the console output will
- go. If the current mode happens to be graphics, then
- the screen will be displayed in that mode. Once
- displayed, press any key to return to the debugger.
-
- For CGA users, if you're in a text mode and wish to see
- another page; instead of pressing FK2, press the shift
- key and a function key ranging from 1 to 8 (FK1-FK8).
- If the current display mode is 40x25 text modes then
- all the eight keys are valid. In 80x25 text modes, only
- the first four function keys are valid.
-
- FK5 Toggle the current condition for the INT and REPx
- instructions.
- Default is OFF.
-
- FK6 Toggle the current condition for the CALL instructions.
- Default is ON.
-
- FK7 Single step one instruction.
- The INT, REPx and the CALL instructions are treated in
- a special way. You can trace through or bypass them.
-
- The current trace conditions for these instructions are
- displayed at the bottom of the debug screen. The
- condition for the INT and REPx instructions are linked
- (meaning that one condition controls both instrs). If
- the condition is YES, then the instructions will be
- traced through. If the condition is NO, then the
- interim instructions are skipped.
-
- FK8 Edit breakpoints.
- There are ten breakpoints available. You can select a
- particular brkpt to edit by using the cursor keys.
-
- There are five fields for each brkpt. You can select a
- particular field by using the TAB (next field) and the
- shift-TAB (previous field) keys.
-
- ON/OFF Press the SPACE key to toggle the current state.
- SEGMENT Segment value of the breakpoint address
- default is the current code segment value.
- OFFSET offset value.
- HIT number of times the above addr needs to be
- executed before a brkpt is signalled.
- default is 1.
- CONTROL For each brkpt, one or two control conditions can
- be set. Each condition consists of two
- operands and a binary operator. The operands
- can be either register names or hex
- constants. If two such conditions are
- specified, then both have to be met before a
- brkpt is signalled.
-
- When editing, type in the condition and press
- the RETURN key, If there is a syntax error,
- then cursor will be positioned under the
- wrong letter. Below are few examples using
- the eight operators allowed.
-
- Brkpt signalled when...
- AX == 4;............ AX is equal to 4
- DH != BH;........... DH is not equal to BH
- CX & 0001;.......... bit#0 of CX is set
- FL ^ 2;............. bit#1 of FLAG is reset
- AX > 8;AX < 10...... AX gtr than 8 AND if less than 10
- DH >= BH;456 <= AX.. DH gtr than equal to BH
- AND
- 456 is less than equal to AX
-
- Command Line Input:
-
- This is the format most are familiar with. It consists of a
- command id followed by an optional argument. This argument,
- which is actually an address, can be specified in various
- ways. You can specify an offset value or a segment value
- (terminated by colon) or a value with both segment and
- offset (separated by colon).
-
- The values can be typed as hex constant, register names or
- as symbolic names (provided a symbol file has be read). Also
- the binary operators + and - are allowed.
-
- Below are few examples using the Display command.
-
- d ds:100
- d ds:MAIN
- d es-1:
- d bp+si
-
- For information on individual commands, refer to the
- online help facility.
-
-
- SYMBOL FILE FORMAT:
-
- When the user program is loaded for debugging, bXd tries to load
- the symbol file associated with that program. These files are
- usually generated by your linker. This version can read in upto
- 200 labels and supports two different file formats.
-
- The first, is a file having the same name as the program but with
- the extension SYM. For example, if the program name is PROG.EXE,
- then the symbol file associated with it would be PROG.SYM.
-
- The format of the file is lines consisting of hex constants,
- space and the ascii symbolic name associated with it. Below is
- such an example. Note that underscore and dollar characters are
- valid.
-
- 034F nmi_
- 03C7 wrt_reg
- 04DB continue
- 046C wrt$hex
- 052B start
-
- The second format is the file that is generated by the MSDOS
- linker and assumes the file extension MAP. This will be of use
- to many users because this linker comes free with your DOS disk
- and is used by many compilers and assemblers.
-
- bXd will try to load a file of the SYM format file first. If that is
- not found then it tries the MAP format file.
-
-
-
- REGISTRATION INFORMATION:
-
- If you use this software regularly and haven't registered, please
- do so. The fee is thirty five dollars. For that, you receive the
- latest version, instructions on how to build the switch, help
- with the internals of the program and personal thanks.
-
- Please send the fee to:
-
- Sonam G Gyato
- 7018 Bergenline Avenue, 2a
- North Bergen, NJ 07047
-
- [SGG 6 Nov, 1986]
-