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 929709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:12:51+00:00 2026-05-15T20:12:51+00:00

I have messed around a few times by making a small assembly boot loader

  • 0

I have messed around a few times by making a small assembly boot loader on a floppy disk and was wondering if it’s possible to make a boot loader in c++ and if so where might I begin? For all I know im not sure it would even use int main().

Thanks for any help.

  • 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-05-15T20:12:52+00:00Added an answer on May 15, 2026 at 8:12 pm

    If you’re writing a boot loader, you’re essentially starting from nothing: a small chunk of code is loaded into memory, and executed. You can write the majority of your boot loader in C++, but you will need to bootstrap your own C++ runtime environment first.

    Assembly is really the only option for the first stage, as you need to set up a sensible environment for running anything higher-level. Doing enough to run C code is fairly straightforward — you need:

    • code and data loaded in the right place;
    • there may be an additional part of the data area which must be zero-initialised;
    • you need to point the stack pointer at a suitable area of memory for the stack.

    Then you can jump into the code at an appropriate point (e.g. main()) and expect that the basic language features will work. (It’s possible that any features of the standard library that may have been implemented or linked in might require additional initialisation at this stage.)

    Getting a suitable environment going for C++ requires more effort, as it needs more initialisation here, and also has core language features which require runtime support (again, this is before considering library features). These include:

    • running static constructors;
    • memory allocation to support new and delete;
    • support for run-time type information (RTTI);
    • support for exceptions;
    • probably some other things I’ve forgotten to mention.

    None of these are required until the C environment is up and running, so the code that handles these can be written in C rather than assembler (or even in a subset of C++ that does not make use of the above features).

    (The same principles apply in embedded systems, and it’s not uncommon for such systems to make use of C++, but only in a limited way — e.g. no exceptions and/or RTTI because the runtime support isn’t implemented.)

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

Sidebar

Related Questions

I have not done any large game development projects, only messed around with little
I have messed around with my apache and php.ini file and my site's users
After I have messed around with directories (created/removed) and added/edited both text and binary
I've been recently playing with Groovy and have messed around with JRuby before and
I have recently messed around with NodeJs and it loading any website and saving
I have messed up the data. I have been ammended ids and values to
I'm not entirely sure whats happened here. I may have messed things up somewhere,
Does anyone know why UsernameExists wont return True. I must have my syntax messed
I have an EC2 machine with ubuntu installed. I sort of messed up my
I'm a Java beginner and have been futzing around with various solutions to this

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.