Package ghidra.app.util.bin.format.omf.omf51

# Class Omf51Segment

java.lang.Object
ghidra.app.util.bin.format.omf.omf51.Omf51Segment

public class Omf51Segment extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ABS`
  `static final int`
  `BIT`
  `static final int`
  `BITADDRESSABLE`
  `static final int`
  `CODE`
  `static final int`
  `DATA`
  `static final int`
  `IDATA`
  `static final int`
  `INBLOCK`
  `static final int`
  `INPAGE`
  `static final int`
  `PAGE`
  `static final int`
  `UNIT`
  `static final int`
  `XDATA`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Omf51Segment(BinaryReader reader, boolean largeSegmentId)`
  Creates a new `Omf51Segment`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `base()`
  Returns the segment base address.
  `int`
  `getType()`
  Returns the segment type (CODE, XDATA, etc).
  `int`
  `id()`
  Returns the segment id.
  `byte`
  `info()`
  Returns the segment info.
  `boolean`
  `isAbsolute()`
  Returns whether or not this segment is absolute.
  `boolean`
  `isCode()`
  Returns whether or not this segment is code.
  `OmfString`
  `name()`
  Returns the segment name.
  `byte`
  `relType()`
  Returns the segment relocation type.
  `int`
  `size()`
  Returns the segment size.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CODE

    public static final int CODE
    See Also:
      - Constant Field Values

  - ### XDATA

    public static final int XDATA
    See Also:
      - Constant Field Values

  - ### DATA

    public static final int DATA
    See Also:
      - Constant Field Values

  - ### IDATA

    public static final int IDATA
    See Also:
      - Constant Field Values

  - ### BIT

    public static final int BIT
    See Also:
      - Constant Field Values

  - ### ABS

    public static final int ABS
    See Also:
      - Constant Field Values

  - ### UNIT

    public static final int UNIT
    See Also:
      - Constant Field Values

  - ### BITADDRESSABLE

    public static final int BITADDRESSABLE
    See Also:
      - Constant Field Values

  - ### INPAGE

    public static final int INPAGE
    See Also:
      - Constant Field Values

  - ### INBLOCK

    public static final int INBLOCK
    See Also:
      - Constant Field Values

  - ### PAGE

    public static final int PAGE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Omf51Segment

    public Omf51Segment(BinaryReader reader, boolean largeSegmentId) throws IOException
    Creates a new `Omf51Segment`
    Parameters:
      `reader` - A `BinaryReader` positioned at the start of the segment definition
      `largeSegmentId` - True if the segment ID is 2 bytes; false if 1 byte
    Throws:
      `IOException` - if an IO-related error occurred

- ## Method Details

  - ### id

    public int id()
    Returns the segment id.
    Returns:
      the segment id

  - ### info

    public byte info()
    Returns the segment info.
    Returns:
      the segment info

  - ### relType

    public byte relType()
    Returns the segment relocation type.
    Returns:
      the segment relocation type

  - ### base

    public int base()
    Returns the segment base address.
    Returns:
      the segment base address

  - ### size

    public int size()
    Returns the segment size.
    Returns:
      the segment size

  - ### name

    public OmfString name()
    Returns the segment name.
    Returns:
      the segment name

  - ### getType

    public int getType()
    Returns the segment type (CODE, XDATA, etc).
    Returns:
      the segment type (CODE, XDATA, etc)

  - ### isCode

    public boolean isCode()
    Returns whether or not this segment is code.
    Returns:
      whether or not this segment is code

  - ### isAbsolute

    public boolean isAbsolute()
    Returns whether or not this segment is absolute.
    Returns:
      whether or not this segment is absolute