System Debug Reference Manual (32650-90888)
110 Chapter4
System Debug Command Specifications :-Exit
D (display)
is calculated by right-shifting the real address of PC by $b (to determine page number), and
then multiplying by $10 since each 4-word PDIR entry is $10=#16 bytes long.
Examples of Code Displays
$nmdebug > dcs sendio+18,7
SYS $a.219f08
00219f08 sendio+$18 6bd83d69 STW 24,-332(0,30)
00219f0c sendio+$1c 4bda3d51 LDW -344(0,30),26
00219f10 sendio+$20 081a0241 OR 26,0,1
00219f14 sendio+$24 081e025f OR 30,0,31
00219f18 sendio+$28 34180050 LDO 40(0),24
00219f1c sendio+$2c ebfe174d BL ?ldm_completion+$1e4,31
00219f20 sendio+$30 37d93dc1 LDO -288(30),25
Display code in the NM system library, starting at sendio+18, for seven words. By default,
the display code commands use the CODE radix and display formatted lines of disassembled
code.
$nmdebug > dcs sendio+18,7,h
SYS $a.219f08 $ 6bd83d69 4bda3d51 081a0241 081e025f
SYS $a.219f18 $ 34180050 ebfe174d 37d93dc1
Display code in the system library, starting at sendio+18, for seven words in hexadecimal.
By default, four words are displayed per line.
%cmdebug > dcs lsearch+11,10
SYS %12.20262
%020262: LSEARCH+%11 051401 S. STOR Q+1
%020263: LSEARCH+%12 000600 .. ZERO, NOP
%020264: LSEARCH+%13 151607 .. LDD Q-7
%020265: LSEARCH+%14 041605 C. LOAD Q-5
%020266: LSEARCH+%15 041604 C. LOAD Q-4
%020267: LSEARCH+%16 031105 2E PCAL ?LSEARCH'
%020270: LSEARCH+%17 013712 .. BRE P+%12
%020271: LSEARCH+%20 031107 2G PCAL ?TRANS'XDST'TO'L
Display code starting at lsearch+11, for %10 words. The procedure is located in the CM
system library, SL.PUB.SYS.
Listing Disassembled Code to a File
The following example demonstrates how to dump disassembled code into a file. The
example is explained command by command, based on the command numbers that appear
within the prompt lines.
Command %10 opens an offline list file with the name codedump. All Debug input and
output is recorded into this file, including the code we intend to display.
Command %11 sets the environment variable term_loud to FALSE. This prevents
subsequent Debug output from being displayed on the terminal. We capture the output in
the list file (codedump), but we do not want the output on the terminal.
Command %12 contains the desired display code command. We display %20 words of
disassembled code, starting at the entry point address ?fopen.
Command %13 closes (and saves) the current list file (codedump).