Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-15
TNS Program Example
VQ Command
The ? command above shows that segment ID 2 is in use. The VQ command allows us
to switch to any segment available to the program. In this example, we first use the VQ
command to switch to segment 1, which had the “abcdefg” data inserted the last time
the EXAMPLE_FILL_ARRAY procedure was called. We then modify the data at
location 0x2ff0 in the segment to demonstrate the FN command.
FN Command
We can use the FN command to find the location of a 16-bit word that matches a
value. The value must be aligned on an even-byte address boundary. The "abcdefg"
we entered earlier was placed into the selectable segment 1 starting on an odd byte
(41), so we start looking for the "bc" part of the character segment, which starts at an
even byte. We have also modified the selectable segment with "bc" at offset 0x2ff0,
which is an even address.
Pressing return on the (FN) prompt caused the FN command to continue searching.
After the second return, we encountered the end of the selectable segment and an
error was reported. Note that the addresses are given in octal word offsets, followed by
the contents of the 16-bit word.
050,03,00013-vq 1
050,03,00013-?
USE SEGMENT ID = %000001
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTAZJAC
PRV = OFF
050,03,00013-m q 0x2ff0,'bc'
050,03,00013-fn q 0, 'bc'
%000025: 0x6263
050,03,00013 (FN)-
%027760: 0x6263
050,03,00013 (FN)-
DEBUG error 50: FN stopped searching at the following address:
0x0009FFF8
Address not valid