DIS(3X)

NAME
dis - disassemble Series 32000 or Series 386 instructions

SYNOPSIS

Balance Only

char *dis32000(addr, len_p)
unsigned long addr;
int *len_p;

dis32000_init(sb, iread, xlate_name, flag)
unsigned int sb;
unsigned char (*iread)();
char *(*xlate_name)();
int flag;

Symmetry Only

char *dis386(addr, len_p)
unsigned long addr;
int *len_p;

dis386_init(sb, iread, xlate_name, flag)
unsigned int sb;
unsigned char (*iread)();
char *(*xlate_name)();
int flag;

DESCRIPTION
Dis32000 is a disassembler for the Series 32000 of processors as incorporated into the Balance architecture; dis386 is a disassembler for the Series 386 of processors as incorporated into the Symmetry architecture. Dis32000 is initialized with dis32000_init; dis386 is initialized with dis386_init. Dis32000_init and dis386 take four arguments:

sb: The current value of the static base register. This is usually 0. The default value of the static base can be found in the a.out header (see a.out(5)). This argument is significant to only the Balance series; the Symmetry series ignores this argument, since it is always 0.

iread:
    A pointer to a routine to return bytes from the instruction space.

xlate_name:
    A pointer to a routine to return the symbolic name of an absolute address. If a NULL pointer is passed as the routine to translate addresses, no translation will be done.

flag:
    If nonzero, for each operand, the disassembler will place the ``true'' addressing mode enclosed in ``<>'' in the text along with the normally displayed operand. For things that have been translated to a name, this will show the underlying addressing mode. For branch, acb, and bsr instructions, this will show the actual offset. This argument is significant to only the Balance series; the Symmetry series ignores this argument.

The routine to return bytes from the instruction space should be declared as follows:

unsigned char iread(addr)
unsigned int addr;

It should return the byte at the address in the instruction space given by addr.

The routine to return the symbolic address of an absolute address should be declared as follows:

char *xlate_name(addr)
unsigned int addr;

It should return a pointer to a static buffer holding the symbolic name of the location given by addr. If no name is found, a NULL pointer should be returned.

Dis32000 and dis386 return a pointer to a static character string that is the disassembly of the given address. They store the length of the instruction in the integer pointed to by len_p.

This routine is found in the Sequent library, designated in ld(1) or cc(1) by -lseq.

SEE ALSO
disas(1)