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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:46:39+00:00 2026-05-22T18:46:39+00:00

I wrote a custom (VERY basic Hello world!) bootloader in Assembler and I would

  • 0

I wrote a custom (VERY basic “Hello world!”) bootloader in Assembler and I would like to execute a C program in that. Would the C program work, or fail due to a lost stdio.h file? And how could I bundle the C program along with the bootloader into a single .bin file to dd to a flash drive/CD?

  • 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-22T18:46:40+00:00Added an answer on May 22, 2026 at 6:46 pm

    I’m not sure what you mean by “lost stdio.h“, but many C runtime functions, including those prototyped in stdio.h, are implemented using system calls. Without an OS running, those system calls won’t work.

    It is possible to write C code that runs without an OS, for example most common bootloaders have just a tiny amount of assembler and mostly C code. The trick is to avoid using runtime libraries. Alternatives to syscalls, for e.g. display, are BIOS calls and hardware-specific I/O.

    To take just one example, in addition to dynamic allocation, fopen in read mode needs the following low-level operations:

    • Reading a block of data from storage
    • Reading the file system metadata (often, superblock and root directory)
    • Processing file system metadata to find out where the file content is stored
    • Creating a FILE object that contains enough information for fread and fgetc to find the data on disk

    You don’t have an OS to help with any of that, your C code will need to implement a driver (possibly calling the BIOS) for block read, and implement the behavior of the other steps.

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

Sidebar

Related Questions

I would like to write a plug-in that will allow a custom written CRM
I want to write a custom view engine that returns custom text (like coma
I work for a custom cabinetry manufacturer and we write our own pricing program
I have very custom TableView like Add Contact View in iPhone's Contacts. I like
I've got this to work using a very basic example(outlined below) and I want
I've written a very small app that handles the custom bug: protocol by opening
I'm trying to write a custom WPF ValidationRule to enforce that a certain property
I'm trying to write a custom function that will let me retrieve a cell
I have a very basic question regarding properties in Objective-C. I can only access
I would like to be able to prioritize the outgoing data/messages from a WCF

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.