Dnia Mon, 05 Mar 2007 08:15:19 +0100, Zara napisa³(a):
There are some systems written in C++. I am working on
an embeddded one that is comprised of a couple of
thousand lines of C++ plus a hundred lines of assembler,
plus 0 (zero) lines of C.
How did you make it?
How can C++ work in an embedded system?
I thaught C++ needs some additional implementation code,
which make base for C++ language facilities before it
call main() function. I mean the things like reserving
static memory, calling constructors for static objects,
exception handling mechanisms etc. And I thaught that
new and delete operators have to be implemented using
some system API/kernel calls to some system memory
manager, and cannot work in "blank" environment without
some system/kernel, which may do the memory management
for new/delete implementation code.
So how it's been done? I'm very curious about that,
because the plain old C doesn't need any runtime
support AFAIK.