## Offset?

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Offset?

Hi,

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

Bye

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

### Re: Offset?

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

Jarvix
Posts: 21
Joined: Mon Apr 06, 2009 6:08 am

### Re: Offset?

"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
Jinix. Kernel programming is a black art that should be avoided if at all possible.

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

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:

http://www.brokenthorn.com/Resources/OSDev4.html

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

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

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

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?

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

### Re: Offset?

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

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

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??

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

### Re: Offset?

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

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

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?

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

### Re: Offset?

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

Andyhhp wrote:Is english your first language?
Why are you asking such question?

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

### Re: Offset?

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

Developer
Posts: 37
Joined: Sun May 30, 2010 4:30 pm

### Re: Offset?

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