Programmer's Workbench Information
All programs must have a .ASM extension
Options
-
Each time you start PWB, do the following
-
Click the Options menu
-
Select the Build Options choice
-
Select Use Debug Options. If you don't do this, it won't build. See
note below for other possibility.
-
All programs must have a .ASM extension. You must type the extension
when saving the file.
Note: It is possible to create an executable by
using the release options. When you create a file using the Release Options
you won't be able to see any symbolic information when you debug the program:
ie, you won't see the names of labels or data. This is good for a release
version, so that people can't see how you coded the program. It is bad when
you are trying to get the program to work. For your class projects always
use the Debug Options. But if you ever develop some software that you
want to distribute, but don't want people to see the source, then link the
program using Release Options like this:
-
Click the Options menu
-
Select the Link Options choice
-
Check the Release Options box
-
Click Additional Release Options
-
Be sure that Pack Executable File is not checked.
CodeView Debugging Information
-
Breakpoint (F9)
-
A breakpoint is a line in your program that will pause execution. Whenever
the program reaches this line, the execution will stop, so that you can examine
variables and issue more commands to the debugger.
-
Step (F8)
-
With the step command, you can execute one instruction at a time. If the
instruction is a call to a subroutine or an interrupt, then the entire subroutine
is executed.
-
Trace (F10)
-
The trace command is similar to the step command, except that if the instruction
is a call to a subroutine or an interrupt, then control will be sent to the
first instruction inside the subroutine.
-
Output Window (F4)
-
See the output of your program.
-
Window Menu
-
There are many different windows that you can display. They are all listed
under the window menu.
-
Watch Window
-
When there is a variable that you want to monitor, you add the variable to
your watch window. Then, you can see the value of the variable, and see the
value everytime it changes.
-
Register Window
-
The register window is very helpful. With it, you can see all the registers
in the 8088. Whenever an instruction changes a value in a register, the new
value will be highlighted in reverse video.
-
Memory Window
-
You can set the memory window to look either at your data segment or your
stack segment. Follow these steps:
-
Step through the first few commands of your program so that the DS register
has the correct value.
-
From the Window menu, select either Memory 1 or Memory 2.
-
From the Options menu, select the same memory window as above.
-
To select the data segment, enter the address expression DS:0
-
To select the stack segment, enter the address expression SS:SP. Remember
that the stack grows from high memory to low memory, so yo will have to scroll
the window up in order to see the stack.