Step 2: Setting Up the Debugger Environment
1-6
Defining an initialization batch file
To create an initialization file named
initdb.bat
, follow these steps using a text
editor; be careful that no spaces precede the equal (=) sign wherever it ap-
pears.
1) To specify the location of the C source debugger executable files and to
ensure that this statement does not overwrite PATH statements in other
batch files, type:
PATH=C:\sim2xx;%PATH%
2) To specify the directory with the C source debugger data files, type:
SET D_DIR=C:\sim2xx
3) To specify directories that contain the program source files that you want
to debug, use the following format to set the D_SRC environment variable:
SET D_SRC=
pathname
1
[
;pathname
2
...]
4) To specify the emulator port address and other options, use the following
format to define the D_OPTIONS environment variable:
SET D_OPTIONS=[–p
port_address
]
[
options
]
5) To add the emulator-reset command to the file, type:
EMURST
6) Save the file as
initdb.bat
, and then exit the text editor.
7) Before you start Windows and any time that you power up or reboot your
PC, invoke this file from a DOS prompt by entering:
INITDB
Figure 1–1 shows a sample initialization file that contains the required path,
environment variables, and emulator-reset statement.
Figure 1–1. Sample Initialization Batch File
PATH=C:\sim2xx;%PATH%
SET D_DIR=C:\sim2xx
SET D_SRC=C:\C2xxcode
SET D_OPTIONS=–b
EMURST
PATH statement
Environment
variables
Reset the emulator