$Id: LibOp.txt,v 1.2 2000/10/04 16:09:55 cosine Exp $
 
 libOp has the sole purpose of disassembling opcodes. It has a very
simple interface, as documented below. This library was designed
to be self-sufficient, so it should be easy to integrate it into
other software packages.

Terminology

  external program: This refers to the program calling routines in
                    libOp

Routines:

=======================================================================
long DisAssemble(data, outbuf, flags)
  unsigned char *data - data (opcodes) to be disassembled
  char *outbuf        - a buffer to store the resulting string in
  unsigned int flags  - various bitmasks

  This function takes the raw opcodes stored in 'data' and produces
the corresponding assembly language string in 'outbuf'.

Return: number of bytes disassembled.
        If an error occurs during disassembly, -1 is returned and
        an appropriate error message is printed to 'outbuf'

Flags: The following bitmasks (defined in disasm.h) can be set in
       the 'flags' argument:

  OP_BITS32 - This indicates that the disassembler should use 32bit
              memory addressing, and also use the 32bit form of an
              instruction, if there is ambiguity. This should always
              be set when disassembling a 32bit ELF file.
=======================================================================
