# op\_plain\_offset

Convert operand to an offset (for the explanations of 'ea' and 'n' please see [op\_bin](https://docs.hex-rays.com/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/696)()) base - base of the offset as a linear address If base == BADADDR then the current operand becomes non-offset Example: seg000:2000 dw 1234h and there is a segment at paragraph 0x1000 and there is a data item within the segment at 0x1234: seg000:1234 MyString db 'Hello, world!', 0 Then you need to specify a linear address of the segment base to create a proper offset: op\_plain\_offset(to\_ea("seg000", 0x2000), 0, 0x10000); and you will have: seg000:2000 dw offset MyString Motorola 680x0 processor have a concept of "outer offsets". If you want to create an outer offset, you need to combine number of the operand with the following bit:

\#define OPND\_OUTER 0x80 // outer offset base // Please note that the outer offsets are meaningful only for // Motorola 680x0.

success op\_plain\_offset(long ea, int n, long base);


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/697.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
