Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9090387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:21:38+00:00 2026-06-16T22:21:38+00:00

I have been developing an 32 bit OS and just implemented a ELF loader.

  • 0

I have been developing an 32 bit OS and just implemented a ELF loader. I can load executable however I would like running programs to each have there own data segment. Now from what I have gathered from research in 32 bit protected mode the data segment refers to a 64k block right? So lets say I set DS to 16, and had code like mov dword eax,[test]. The processor gets the what is at test like (DS * 0xFFFF) + test right? So if test was 0 then the actual address it would be reading at would be 983025 or 0xEFFF1? Is this right or am I totally off

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:21:39+00:00Added an answer on June 16, 2026 at 10:21 pm

    Now that you are developing your own OS, the data segment, as well as code segment and stack segment can be almost whatever you like.

    In 386 PE segment registers “point” to a descriptor table, residing in physical memory, where each segment is assigned 8 bytes (or possibly 16 bytes in x64?) to define the base address, read/write/execute flags and the segment size.

    Typically these limits are set as 0 and 2^32(-1), which is also called a flat mode.

    Even when using linux/cygwin etc. compliant gcc, it’s quite possible to benefit from the segmented architecture knowing that each memory access uses a default segment depending on the base register. As long as all local variables are accessed using mov [ebp + ... ] or mov [esp + ...] as base register, Stack Segment is used. This can be used in exception handling to distinguish in between stack corruption vs. heap corruption. It can be utilized in automatically growing data / stack segments etc. It can be used in providing separated data areas for applications — perhaps one could implement memory mapped file API through segmentation — as opposed to linux, where fs: and gs: are reserved for kernel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing on an advertising system, which have been running just fine
I have been developing an 32 bit operating system and I want to allow
A bit of background: I have been developing apps for the past 2 years
I have been developing web apps (primarily) using php and a bit of python,
I'm developing an Android app and have been looking around a bit on how
I have been developing a bit of code for the last few weeks. The
I have just been developing a postcode distance calculator for my Dads company, where
I have been developing under Python/Snowleopard happily for the part 6 months. I just
I have been developing an user interface with Java Swing, and I have met
I have been developing the application for drawing, and I have the problem: my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.