Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-32
Native Program Example
Checking for Open Files
We check for open files using the find (F) command. We find that there is no open file
at this point in our example.
We advance to the breakpoint at the end of the EXAMPLE_INIT procedure using the
resume command, and verify our location with the LMAP command:
N-address Mode
We look at the various data locations again:
We used the value found for HOMETERM_LEN at $SP + %H7E for the length of the A
command. We rounded the result up to the next even number before dividing by 2. We
also specified the output to be displayed in byte-form instead of 16-bit word-form. (The
letters C or B1 could have been used instead of B for the same result.)
In executing the above commands, we used the N-address mode. This is a common
practice with native programs, because they use 32 bit-words and hexadecimal values
more often than TNS or accelerated programs.
DN Command
Many programmers prefer to use the DN command for displaying output information.
For working with 32-bit operations, the 32-bit byte-form is used (programmers do not
need to convert from 16-bit word-form). Also, twice as much information is displayed
and hexadecimal is the default display format. In the following example, we display the
variables discussed above using the DN command.
050,03,00266-F
# -1 ??? # 00000
050,03,00266-R
DEBUG $PC=0x7000045C -RISC BREAKPOINT ($PC: 0x7000045C)-
050,03,00266-LMAP $PC
EXAMPLE_INIT + 0xCC (UCr)
050,03,00266-D N 0x08000000, 1 :H
08000000: 0x0001
050,03,00266-D N $SP + %H7E , 1:D
4FFFFEAE: #00019
050,03,00266-A N $SP + %H80, #20/2, B
4FFFFEB0:\M5.$ZTN00.#PTUGRB0.