Using the Browser

The Browser can search a database of selected files to get a list of references and definitions, to build a call tree and outline, or to create a list of relationships among program symbols. You can examine this material to see how your program is structured. Figure 3.7 shows how HELLO.ASM calls the PutStr procedure.

The commands on the Browse menu are referred to collectively as the PWB Source Browser. Before using these commands, you must define the database the Source Browser is going to search.

·To define a database:

1.Generate a program list using the Set Program List command from the Make menu. The files contained in the program list make up the database.

2.Choose Browse Options in the Options menu. You must select the Generate Browse Information field in the dialog box to create the Source Browser database. The rest of the fields in this dialog box offer you choices of how to build the database; they are optional.

3.Build your program using the commands from the Make menu. When you build the program, a file with the same program-list root name and a .BSC (Browser Source Cache) extension is created. This file contains reference information used by the Browser.

Once you have completed these steps, the following Browse menu commands are ready for you to use:

The Goto Definition command provides a list of symbols and variables that occur within include files and modules. You can immediately open the file at the line number where the definition of a symbol or variable appears by selecting the OK button.

The Goto Reference command displays a list of files and line numbers where symbols and variables have been referenced in include files and modules.

The View Relationships command provides detailed information about various portions of your program. You can examine functions, macros, types, and variables by their use, definition, or inclusion in include files and modules.

The List References command displays references to functions, macros, types, and variables. You can move the cursor to a reference and then use the Goto Definition or Goto Reference command to show occurrences of the reference.

The Call Tree command displays a tree structure of function calls within the program.

For additional information about the Browser, refer to the online reference system.

NOTE:

You can create a Browser information file with the ML (command-line) assembler using the /FR or /Fr option. This creates a .SBR file, which you must convert to a Browser-readable .BSC file with the PWBRMAKE.EXE utility.