HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 4 System Debug Command Specifications

DIS

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Disassembles a single NM or CM assembly instruction, based on the current mode.

Syntax

   DIS nmword [virtaddr]

   DIS cmword1 [cmword2] [cmlogaddr]

The DCx (display code) commands can be used to display a block of code at a specified address. The program windows also display disassembled code.

Parameters

nmword

The Precision Architecture instruction to disassemble. All disassembled values are in decimal unless otherwise indicated.

cmword1

The CM HP 3000 instruction to disassemble.

cmword2

A second CM HP 3000 instruction to disassemble for double-word instructions.

virtaddr

If a virtual address is given, this value is used when computing branch addresses. That is, "disassemble this instruction as if it were at the indicated address." A valid virtual address results in branch targets being printed as a procedure name plus offset. If this value is omitted, branch targets always appear as numeric values.

cmlogaddr

If a CM logical address is specified, the address is used to compute the targets of CM PCAL instructions.

Cmlogaddr must be a full CM logical code address (LCPTR).

For example,

CMPC

Current CM program counter

CMPW+4

Top of CM program window + 4

PROG(2.102)

Program file logical seg 2 offset 102

fopen+102

CM procedure fopen + %102 (assumes CM mode)

cmaddr('fopen')+%102

CM procedure fopen + %102 (NM or CM mode)

Examples

   $nmdebug > dis 6bc23fd9

   STW      2,-20(0,30)

This NM example disassembles the NM word $6bc23fd9 into the STW instruction.

   $nmdebug > dis e84001d8

   BL       $000000f4,2

   $nmdebug > dis e84001d8, a.4adeb4

   BL       test_proc+$68,2

This NM example disassembles the word $e84001d8 into a BL instruction. In the second command, the virtual address of the instruction is specified, and the disassembler is able to compute and to display the effective procedure name target of the branch.

   %cmdebug > dis 41101

   LOAD  DB+%101

This CM example disassembles the single CM word %41101 into the LOAD DB+%101 instruction.

   %cmdebug > dis 20477 43

   LDDW  SDEC=1

This CM example disassembles the two CM words, %20477 and %43, into the LDDW SDEC=1 instruction.

   %cmdat > dis 31163

   PCAL %163

   %cmdat > dis 31163,,sys(25.0)

   PCAL ?SWITCH'TO'NM'

   %cmdat > dis 31163,,sys(1.0)

   PCAL ?ATTACHIO

These CM examples involve the CM PCAL instruction. In the first example, 31163 is recognized as the PCAL instruction, but the STT number is invalid for the current CM segment. In the second example, the instruction is disassembled as if it were found in CM logical segment SYS %25, and the resulting destination of the PCAL is displayed as ?SWITCH'TO'NM. The third example indicates that within CM logical segment SYS 1, the resulting target of a PCAL %163 is ?ATTACHIO.

   %cmdat > var n 1

   %cmdat > while 1 do {w "stt: " n:"w3" "  " ;dis 31000+n; var n n+1}

   stt:   %1  PCAL ?TERMINATE

   stt:   %2  PCAL ?TERMINATE

   stt:   %3  PCAL ?ABORTJOB

   stt:   %4  PCAL ?ACTIVATE

   stt:   %5  PCAL ?ADOPT

   stt:   %6  PCAL ?ONENET'ADOPT

   stt:   %7  PCAL ?CREATEPROCESS

   stt:  %10  PCAL ?EXEC'TERMINATE

   stt:  %11  PCAL ?GET'PLFD'TBLPTR

   stt:  %12  PCAL ?GETORIGIN

   stt:  %13  PCAL ?GETPRIORITY

   stt:  %14  PCAL ?GETPROCID

   stt:  %15  PCAL ?GETPROCINFO

   stt:  %16  PCAL ?JSM'TO'CI'PIN

   stt:  %17  PCAL ?KILL

   stt:  %20  PCAL ?PROCINFO

   stt:  %21  PCAL ?PROCTIME

   stt:  %22  PCAL ?SET'JSM'TIME'LI

   stt:  %23  PCAL ?SET'PLFD'TBLPTR

   stt:  %24  PCAL ?SUSPEND

   stt:  %25  PCAL ?XCONTRAP

   stt:  %26  PCAL ?NM'BREAKCONTROL

   stt:  %27  PCAL ?SETSERVICE

   stt:  %30  PCAL ?REQUESTSERVICE

   stt:  %31  PCAL ?RESETCONTROL

   stt:  %32  PCAL ?CAUSEBREAK

   stt:  %33  PCAL ?CAUSEBREAK'

   stt:  %34  PCAL ?BRK'IN'BREAK

   stt:  %35  PCAL ?BRK'ABORT

   stt:  %36  PCAL ?BRK'RESUME



   control-Y encountered

   %cmdat >

This example demonstrates how a simple loop can be used to display the targets for each STT entry within the current CM segment. Since we know that %31000 is the PCAL instruction, we simply add the desired STT number and use the DIS command to display the target entry point name. Control-Y is used to terminate the loop.

Limitations, Restrictions

none

CAUTION: The output format of all System Debug commands is subject to change without notice. Programs that are developed to postprocess System Debug output should not depend on the exact format (spacing, alignment, number of lines, uppercase or lowercase, or spelling) of any System Debug command output.
Feedback to webmaster