Re: How to create a standalone C program?
- From: santosh <santosh.k83@xxxxxxxxx>
- Date: Wed, 01 Aug 2007 00:52:27 +0530
dspfun wrote:
How do you create a standalone C program? With standalone C program I
mean it should run "freestanding" on a CPU without an OS or other
supporting software/libraries linked to the C program. After the bios/
setup has done its initializations and "stuff" I would like to be able
to continue execution with my own C program. The C program will be
really simple to start with, for example just write an integer value
to a memory address.
Thanks!
You should probably ask this question in a group for your system. Generally,
some amount of native assembler code will be required to set up the
environment that C expects. Also you'll have to find some way to make your
system's firmware load your program into memory and pass control to it. The
details are completely system specific and off-topic for this group. Also
you need to take special steps to compile your program as a freestanding
one. In the process you'll lose access to most functions of the Standard
library, and might have to implement your own replacements.
I suggest the following groups:
alt.lang.asm, comp.lang.asm.x86 and alt.os.developement.
Though your question is not exactly topical for any of the above groups,
they might be able to answer your question better, since they can discuss
system specific topics.
.
- Follow-Ups:
- Re: How to create a standalone C program?
- From: Keith Thompson
- Re: How to create a standalone C program?
- References:
- How to create a standalone C program?
- From: dspfun
- How to create a standalone C program?
- Prev by Date: Re: error: expected ')' before '*' token -- What is this ?
- Next by Date: Re: Bounds checking and safety in C
- Previous by thread: How to create a standalone C program?
- Next by thread: Re: How to create a standalone C program?
- Index(es):
Relevant Pages
|