Find the answer to your Linux question:
Results 1 to 4 of 4
How does one go about finding the segment and offset of a 16-bit address? (For x86 -- real mode)...
  1. #1
    Just Joined! Alboin's Avatar
    Join Date
    Jan 2007
    Posts
    59

    Offset and Segment of an Address

    How does one go about finding the segment and offset of a 16-bit address? (For x86 -- real mode)

  2. #2
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    I believe your question is very highly contextually dependent...

    There is not a single answer - because there is not a one-to-one association of physical and segment : offset addresses. The 'x86' architecture actually requires that physical addresses be addressable by multiple segment : offset addresses (by design, 'relative' rather than 'fixed' addressing).

    However, I would like to suggest that - for a 16-bit address, the segment would be zero - because [based on 'x86' architecture], the offset alone is a 16-bit number...

    Hope this helps (at least a little)...

  3. #3
    Just Joined! Alboin's Avatar
    Join Date
    Jan 2007
    Posts
    59
    Thanks...

    Okay, so when I do something like this:

    LDS, ds, [something-16bit]

    What does LDS load in ds?

    Edit: Fixed

  4. #4
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    I do not believe 'LDS ds,----' is a valid instruction...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...