Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-43
Native Program Example
Finding Bit Patterns
If we want to find a bit pattern and do not care what is in the other bits, we can use
masking. In the following example, we look for a "c" in the second byte of the 16-bit
word and ignore the other bits. The "x" is the value we were looking for, and the 0x62,
"b", was ignored when finding the match.
We resume the program again and enter a different data pattern from what is
contained in segments 1 and 2. The selectable segment 17 is longer than segment 1
or segment 2. We use this to show some variations on the commands.
For the next example, we modify a 32-bit word in the selectable segment. We use the
modify command with an N-address prefix to do the 32-bit operation.
= %00002000052 #524330 0x0008002A '...*'
050,03,00266-= 0x6263
= %061143 #25187 0x6263 'bc'
050,03,00266-fn q 0, 'xc' & 0x00ff
%000025: 0x6263
050,03,00266 (FN)-
%027760: 0x6263
050,03,00266 (FN)-
050,03,00266-r
enter some data
0123456789
DEBUG $PC=0x70000568 -RISC BREAKPOINT ($PC: 0x70000568)-
050,03,00266-?
USE SEGMENT ID = %000021
BASE STANDARD IN
BASE STANDARD OUT
TERM \M5.$ZTN00.#PTUGRB0
PRV = OFF
050,03,00266-AMAP Q #140000
Address: 0x000A22E0
Kind = 0x0013: Unknown
Attributes: none
050,03,00266-m n 0x000A22E0
0x000A22E0 : 0x00000000 <- '3456'
0x000A22E4 : 0x00000000 <-