Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-8
TNS Program Example
address 1 and is 10 16-bit words long. For information about how we obtained these
numbers, see Example F-2 on page F-4. Here, we omit UD for the address because
UD is the default option for the D command. The commands entered and the outputs
displayed:
Using Extended Addressing
At this point in the EXAMPLE_INIT procedure, the local extended integer pointer,
HANDLE_PTR, located at L + 2, has been set to the program’s global array,
PROCESS_HANDLE, starting at UD + 1. We can display the information in
PROCESS_HANDLE using two methods: reading the pointer address stored at L+2
and L+3 and then using that address to display the information in
PROCESS_HANDLE, or we can use the extended integer indirect clause in the
address part of the D command.
When displaying the extended pointer, we will set the display format to group in 4
bytes, thus using B4. For the second part of the display, we need to divide the
extended pointer value by 2 because extended pointers are byte-aligned and the
address specified to the D command must be word aligned when referencing the user
data area. Both methods are shown here:
BASE Command
Most Debug commands have default base for numeric input and output. The default
input can be overridden by prefixing the number with the appropriate numeric prefix (%
for octal, # for decimal, or 0x or %h for hexadecimal). The default output of some
Debug commands can be changed with an output base as was shown in the previous
050,03,00013-d 1, #10
%000001: %000400 %000000 %000003 %000015 %000000 %000000 %000014 %130212
%000011: %000000 %000062
050,03,00013-d 1, #10 :d
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050
Note. Because Debug is not case-sensitive, you can use lowercase or uppercase letters when
entering Debug commands.
050,03,00013-D L+%2, %2 , B4 :h
%000024: 0x00000002
050,03,00013-d 0x00000002 /2, #10 :D
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050
050,03,00013-D L+%2IX, #10 :D
%000001: #00256 #00000 #00003 #00013 #00000 #00000 #00012 #45194
%000011: #00000 #00050