<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
an	O
offset	B-General_Concept
within	O
an	O
array	B-Data_Structure
or	O
other	O
data	B-General_Concept
structure	I-General_Concept
object	O
is	O
an	O
integer	O
indicating	O
the	O
distance	O
(	O
displacement	O
)	O
between	O
the	O
beginning	O
of	O
the	O
object	O
and	O
a	O
given	O
element	O
or	O
point	O
,	O
presumably	O
within	O
the	O
same	O
object	O
.	O
</s>
<s>
The	O
concept	O
of	O
a	O
distance	O
is	O
valid	O
only	O
if	O
all	O
elements	O
of	O
the	O
object	O
are	O
of	O
the	O
same	O
size	O
(	O
typically	O
given	O
in	O
bytes	B-Application
or	O
words	B-General_Concept
)	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
A	O
is	O
an	O
array	B-Data_Structure
of	O
characters	O
containing	O
"	O
abcdef	O
"	O
,	O
the	O
fourth	O
element	O
containing	O
the	O
character	O
'	O
d	O
 '	O
has	O
an	O
offset	B-General_Concept
of	O
three	O
from	O
the	O
start	O
of	O
A	O
.	O
</s>
<s>
In	O
computer	O
engineering	O
and	O
low-level	O
programming	O
(	O
such	O
as	O
assembly	B-Language
language	I-Language
)	O
,	O
an	O
offset	B-General_Concept
usually	O
denotes	O
the	O
number	O
of	O
address	O
locations	O
added	O
to	O
a	O
base	B-General_Concept
address	I-General_Concept
in	O
order	O
to	O
get	O
to	O
a	O
specific	O
absolute	O
address	O
.	O
</s>
<s>
In	O
this	O
(	O
original	O
)	O
meaning	O
of	O
offset	B-General_Concept
,	O
only	O
the	O
basic	O
address	O
unit	O
,	O
usually	O
the	O
8-bit	O
byte	B-Application
,	O
is	O
used	O
to	O
specify	O
the	O
offset	B-General_Concept
's	O
size	O
.	O
</s>
<s>
In	O
this	O
context	O
an	O
offset	B-General_Concept
is	O
sometimes	O
called	O
a	O
relative	B-General_Concept
address	I-General_Concept
.	O
</s>
<s>
In	O
IBM	B-Application
System/360	I-Application
instructions	O
,	O
a	O
12-bit	O
offset	B-General_Concept
embedded	O
within	O
certain	O
instructions	O
provided	O
a	O
range	O
of	O
between	O
0	O
and	O
4096	O
bytes	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
within	O
an	O
unconditional	O
branch	O
instruction	O
(	O
X'47F0Fxxx'	O
)	O
,	O
the	O
xxx	O
12bit	O
hexadecimal	O
offset	B-General_Concept
provided	O
the	O
byte	B-Application
offset	B-General_Concept
from	O
the	O
base	O
register	O
(	O
15	O
)	O
to	O
branch	O
to	O
.	O
</s>
<s>
An	O
odd	O
offset	B-General_Concept
would	O
cause	O
a	O
program	O
check	O
(	O
unless	O
the	O
base	O
register	O
itself	O
also	O
contained	O
an	O
odd	O
address	O
)	O
—	O
since	O
instructions	O
had	O
to	O
be	O
aligned	O
on	O
half-word	O
boundaries	O
to	O
execute	O
without	O
a	O
program	O
or	O
hardware	O
interrupt	B-Application
.	O
</s>
<s>
The	O
previous	O
example	O
describes	O
an	O
indirect	O
way	O
to	O
address	O
to	O
a	O
memory	O
location	O
in	O
the	O
format	O
of	O
segment:offset	O
.	O
</s>
<s>
One	O
way	O
this	O
can	O
be	O
accomplished	O
is	O
by	O
first	O
defining	O
a	O
segment	O
with	O
beginning	O
address	O
0xF000	O
,	O
and	O
then	O
defining	O
an	O
offset	B-General_Concept
of	O
0x0867	O
.	O
</s>
<s>
to	O
the	O
offset	B-General_Concept
of	O
the	O
class	O
itself	O
,	O
not	O
the	O
base	B-General_Concept
address	I-General_Concept
.	O
</s>
<s>
If	O
the	O
class	O
's	O
offset	B-General_Concept
is	O
0xFF881	O
and	O
the	O
base	B-General_Concept
address	I-General_Concept
is	O
0x0A100	O
,	O
then	O
to	O
retrieve	O
the	O
"	O
color	O
"	O
attribute	O
both	O
offsets	B-General_Concept
are	O
added	O
to	O
the	O
base	B-General_Concept
address	I-General_Concept
.	O
</s>
