473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

c runtime

Hello all,

I know c run time term, and also I use c run time lib. But I still confused
about what's the c run time? Is there run time environment created before
loading the c/c++ program? If there is, what's its functionality ? Someone
can give me a detailed and system explanation or give a good link to address
this issue? Thanks very very much!

John Sun
Nov 14 '05 #1
6 4902
john sun wrote:
Hello all,

I know c run time term, and also I use c run time lib. But I still
confused about what's the c run time? Is there run time environment
created before loading the c/c++ program?
Assuming you mean the C program, the answer is: yes.
If there is, what's its functionality ?


What do you think calls main()? :-)

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #2
In <qN******************@newssvr16.news.prodigy.com > "john sun" <jo*****@sbcglobal.net> writes:
I know c run time term, and also I use c run time lib. But I still confused
about what's the c run time? Is there run time environment created before
loading the c/c++ program?
It is created before executing the main function of the C program.
If there is, what's its functionality ?


At the very least, it must create the argv array and call main() in such
a way that returning from its initial invocation has the same effect as
calling exit() with its return value. This can be trivially achieved
with:

exit(main(argc, argv));

If the compiler relies on the CPU being initialised in a certain way
(e.g. the FP rounding mode, denormal handling or FP exception handling),
this initialisation must also take place before main() is called.

Some of the library functions may also require certain initialisations
to be performed before main() is executed (e.g. the setup of the malloc
and friends arena).

When people talk about the C run time, they usually refer to the C run
time support provided by the implementation, i.e. the startup module doing
the jobs described above and the libraries available to a C program.

The C run time environment is a more complex concept, depending on how the
implementation works: by compiling C into machine code or by interpreting
it. In the former case, the C run time environment consists of the C run
time support and the OS under which the program runs. In the latter,
there is an additional software layer between the C program and the OS,
whose existence is needed because usual computers cannot execute C code
directly.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #3
"john sun" <jo*****@sbcglobal.net> wrote in
news:qN******************@newssvr16.news.prodigy.c om:
Hello all,

I know c run time term, and also I use c run time lib. But I still
confused about what's the c run time? Is there run time environment
created before loading the c/c++ program?


Yes. C++ is not C. A minimal C run-time would at least clear unitialized
variables (sometimes called BSS) and set initialized variables with their
initial values (sometimes called DATA). At some point the C run-time code
will call main() with proper arg. support and handle a return from main()
or exit() call.

--
- Mark ->
--
Nov 14 '05 #4
In <Xn********************************@130.133.1.4> "Mark A. Odell" <no****@embeddedfw.com> writes:
Yes. C++ is not C. A minimal C run-time would at least clear unitialized
variables (sometimes called BSS) and set initialized variables with their
initial values (sometimes called DATA).


On typical hosted implementations, this is the OS's job, when loading the
executable image from the disk and it is not something language specific.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #5
Da*****@cern.ch (Dan Pop) wrote in news:bu**********@sunnews.cern.ch:
Yes. C++ is not C. A minimal C run-time would at least clear unitialized
variables (sometimes called BSS) and set initialized variables with
their initial values (sometimes called DATA).


On typical hosted implementations, this is the OS's job, when loading
the executable image from the disk and it is not something language
specific.


You are correct. If only I had an OS on my microcontrollers to do this for
me. I do not find implementing the C run-time support particularly
interesting.

--
- Mark ->
--
Nov 14 '05 #6
In <Xn********************************@130.133.1.4> "Mark A. Odell" <no****@embeddedfw.com> writes:
You are correct. If only I had an OS on my microcontrollers to do this for
me. I do not find implementing the C run-time support particularly
interesting.


It should provide you with a lot of insight about the microcontrollers
you're programming on, insight that should be useful when writing your
applications. Especially if you have to meet execution time and/or
program size constraints.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Lauren Wilson | last post by:
Ok I have searched the MS website for info on this. I am totally confused. If I want to deploy an Access 2003 app and allow my users to run it using Access 2003 Runtime, where do I get the...
10
by: MLH | last post by:
I am concerned. I have recently moved to A97 from Access 2.0 where I rolled out runtime apps with the ADT. Now, the Office Pro Developer's Edition with Access 97 is what I'm using. I find some...
17
by: Owen Jenkins | last post by:
I have an Access application that is being used by 150+ clients. I develop in 97, convert to 2000 and distribute as a 97 or 2000 mde, or 97 runtime. This limits me to 97 functions. My clients may...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
28
by: larpup | last post by:
I have computers setup with A97 runtime with mde's. Work perfectly. I've written an app in 2003 and purchased the Developer extensions. When I load A2003 runtime with my app on a computer that...
3
by: =?Utf-8?B?R3JhaGFt?= | last post by:
I've added 2 tracking services to the wf runtime; one is the standard SqlTrackingService: trackingService = new SqlTrackingService(<trackingConnectionString>); <workflow...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
6
by: SMcK | last post by:
I have a PDA-based (Syware Visual CE) database which I need to sync to an Access database. The Access database contains three tables: 1 is the data itself, 2 is a linked table that prefills...
7
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then...
2
by: mohi | last post by:
hello every one , this may be very basic question and may be a bit out of topic ,, can anyone please tell me what are the functions of runtime library and are they the one which create the...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.