TAL Programmer's Guide

Debugging Programs
Running and Debugging Programs
16–6 096254 Tandem Computers Incorporated
Sample Inspect Session This discussion presents a source file and shows the steps for running the object file in
an Inspect session.
Sample Source File
The sample source file is named MYSRC. Figure 16-1 shows the source code in the
sample source file.
Figure 16-1. Sample Source File
!This is a source file named MYSRC.
?INSPECT !Request symbolic debugger
?SYMBOLS !Save symbols in object file
! for symbolic debugger
?NOLIST, SOURCE $system.system.extdecs (initializer)
!Include system procedure
! without its listing
?LIST
PROC myproc MAIN; !Declare procedure MYPROC
BEGIN
INT var1; !Declare variables
INT var2;
INT total;
CALL initializer; !Read the start-up message
var1 := 5; !Assign value to VAR1
var2 := 10; !Assign value to VAR2
total := var1 + var2; !Assign sum to TOTAL
END; !End MYPROC