Results 1 to 2 of 2

Thread: offset

  1. #1
    Junior Member
    Join Date
    May 2008
    Answers
    8

    offset

    the far pointer holds the offset address and the segment address.. so its size is 4 bytes in the 16 bit compiler.. ...wat is the offset address and segment address???give me a brief explanation please....


  2. #2
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: offset

    hi friend..

    In x86 CPUs, memory addresses are composed of two parts:

    the segment address and the offset. These two are added together to produce the "real" address of the memory location, by shifting the
    segment address one hex digit to the left (which is the same as multiplying it
    by 16, since memory addresses are expressed in hexadecimal notation) and then adding the segment offset to it.

    (Yes, this is strange and not intuitive unless you are a PC programmer, and maybe not even then.)

    The address itself is often referred to using the notation segmentffset.
    Because of the peculiarity of this scheme, there are in fact many combinations of
    segments and offsets that can result in the same linear address. Let's take C8000h again. The standard way to refer to this address is C000:8000; to get to the linear address you take C000, shift it one digit to the left to get C0000, and then add 8000 to get C8000. However, C800:0000 results in the same linear address.

    Thanks
    Deepasree


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact