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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:06:03+00:00 2026-05-31T04:06:03+00:00

As the title says, what are they and what’s the difference? Some examples: dmain

  • 0

As the title says, what are they and what’s the difference?

Some examples:

dmain:

void dmain(void* mbd, unsigned int magic)

kmain:

void kmain( void* mbd, unsigned int magic )

P.S. I found a similar post here but it was about wmain:

What is the difference between wmain and main?

Also _tmain:

What is the difference between _tmain() and main() in C++?

__

They take the same arguments but is there a difference? And any links to some info this so I could learn is appreciated, google yielded weird results…

Also, is there an official sort of like ‘man’ pages of C?

  • 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-31T04:06:04+00:00Added an answer on May 31, 2026 at 4:06 am

    You seem to be referring to this tutorial on OSDev.org.

    If you’ll notice, this is not a standard C program with main() as its entry point. In fact, the page shows two entry points: one written in Assembler in a way for GRUB to find & load, and which sets up & loads the second, kmain(), which is written in C. The writers use the name kmain to mean “kernel main”; presumably dmain is the entry point for drivers & would stand for “driver main”.

    C makes a distinction between “freestanding” and “hosted” implementations. Hosted is what you’re probably more familiar with; the standard C library is available, and all programs start at the main function.

    OS kernels are (often) good examples of freestanding environments. The C library will likely not be available, for example (except for certain headers like stddef.h & stdarg.h; see the standard for details). Also, the entry point is not defined by the standard anymore. The OSDev.org tutorial is making a special point of that fact, by explicitly defining its entry point with a different name.

    You could probably run the tutorial renaming kmain to main, but note that it’s still void main(void*, unsigned int), not int main(int, char**); in fact that sort of confusion is likely part of the reason the writers chose to use a different name. But is is just a convention they’ve selected, not anything standardized.

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

Sidebar

Related Questions

As the title says what is the difference between dispatcher-servlet.xml and spring-servlet.xml They seem
What the title says. Are they the same? I've noticed that the first does
As the title says... are they considered different languages? For example if you've written
As the title says, I'm having two questions. Edit : To clarify, they don't
As the title says, I am just a little curious...I have seen some European
as the title says, what is the difference between a pointer and an object.
Pretty much what the title says really. We have some code that is .NET
As the title says, are there limits (if any) for session variables or they're
As the title says. Where do they go? they're variables, but they're also code...
As the title says, I need two divs to be equally high. They should

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.