Page 1 of 1

Offset?

Posted: Fri Aug 06, 2010 11:17 am
by Developer
Hi,

What does "Offset" mean?
Can somebody explain that in-depth,
and give me more details. Thanks!

Bye

Re: Offset?

Posted: Fri Aug 06, 2010 8:28 pm
by Andyhhp
Depends. Can you give the context in which you found it? (code example or so)

There is more than 1 meaning which I can think of, depending on context.

~Andrew

Re: Offset?

Posted: Sat Aug 07, 2010 10:42 am
by Jarvix
"Offset" says the value is relative.

If you have point A at 20px horizontal, and point B at 30px, then offset of B (to A) would be 10px.

Thats the general idea.

// Jarvix

Re: Offset?

Posted: Tue Aug 10, 2010 1:45 pm
by Developer
Andyhhp wrote:Depends. Can you give the context in which you found it? (code example or so)

There is more than 1 meaning which I can think of, depending on context.

~Andrew
Hi Andrew:

I got it from this page:
http://www.brokenthorn.com/Resources/OSDev4.html

We can convert the above to the absolute address 0x7C00 by using our formula:
base address = base address * segment size (16) + offset
07C0:0000 = 07C0 * 16 (decimal) + 0
= 07C00 + 0 = 0x7C00

Can you explain this in details, I really want to learn. Thanks!

Re: Offset?

Posted: Tue Aug 10, 2010 1:45 pm
by Developer
Jarvix wrote:"Offset" says the value is relative.

If you have point A at 20px horizontal, and point B at 30px, then offset of B (to A) would be 10px.

Thats the general idea.

// Jarvix
Is it junk memory?

Re: Offset?

Posted: Tue Aug 10, 2010 2:04 pm
by Andyhhp
Can you explain this in detail
Real mode (16bit mode) addressing works using the Segment:Offset method.

Both segment and offset are two numbers.

In this case, offset is just a name for a number. Im not sure how else to describe it.

In the case that you gave, the segment value was 0x7C0 and the offset value was 0

That means that the linear address pointed to by the segment:offset pair was 0x7C00 because of the rule for converting a segment:offset pair to a linear address.

~Andrew

Re: Offset?

Posted: Tue Aug 10, 2010 2:17 pm
by Developer
Andyhhp wrote:
Can you explain this in detail
Real mode (16bit mode) addressing works using the Segment:Offset method.

Both segment and offset are two numbers.

In this case, offset is just a name for a number. Im not sure how else to describe it.

In the case that you gave, the segment value was 0x7C0 and the offset value was 0

That means that the linear address pointed to by the segment:offset pair was 0x7C00 because of the rule for converting a segment:offset pair to a linear address.

~Andrew
So that means between 0 and 0x7c00 is the offset segmentation.
Or am I wrong??

Re: Offset?

Posted: Tue Aug 10, 2010 2:24 pm
by Andyhhp
Nope.

I have no idea where you got "offset segmentation" from but its really confusing matters.

The Offset is a number, and the Segment is a number. 'Offset' and 'Segment' are just names for numbers, in the same way you might use x or y in algebra.

~Andrew

Re: Offset?

Posted: Thu Aug 12, 2010 1:28 pm
by Developer
Andyhhp wrote:Nope.

I have no idea where you got "offset segmentation" from but its really confusing matters.

The Offset is a number, and the Segment is a number. 'Offset' and 'Segment' are just names for numbers, in the same way you might use x or y in algebra.

~Andrew
Please do NOT feel offended, but can you give me more details?
Where is Mike?

Re: Offset?

Posted: Thu Aug 12, 2010 1:46 pm
by Andyhhp
Is english your first language?

Re: Offset?

Posted: Thu Aug 12, 2010 1:47 pm
by Developer
Andyhhp wrote:Is english your first language?
Why are you asking such question?

Re: Offset?

Posted: Thu Aug 12, 2010 1:53 pm
by Andyhhp
Because your questions are not making logical sense.

You asked "what does offset mean" and had two answers. One for the question "what does the word offset mean" and one for the question "what does the offset in this specific case mean".

The fact that you are still asking the same origininal question probably means that english is not your first language

Re: Offset?

Posted: Thu Aug 12, 2010 1:56 pm
by Developer
Andyhhp wrote:Because your questions are not making logical sense.

You asked "what does offset mean" and had two answers. One for the question "what does the word offset mean" and one for the question "what does the offset in this specific case mean".

The fact that you are still asking the same origininal question probably means that english is not your first language
No no, the fact is that I want more in-depth details. That's one of the reasons
why I asked.