Re: mixing C and assembly
- From: Neil Cherry <njc@xxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 21:59:30 -0500
On Fri, 25 Apr 2008 00:08:56 +0200, David Brown wrote:
Neil wrote:
Walter Banks wrote:
I am not sure how that works. I am talking about the code that jumps to
Neil wrote:
Walter Banks wrote:
Vladimir Vassilevsky wrote:Do not forget the startup code
You have to resort to assembly in the two special cases:In your second point I would qualify it to parts of code
1. The system level work like switching the contexts of the tasks, C
startup code, etc.
2. The parts of code where the performance is very critical.
requiring exact timing on anything that we have released
recently that seems to be the only limitation.
Our startup code is in C.
w..
main after setting up the C environment.
So is he.
There are small bits of the startup that must be in assembler (I use
embedded assembly within the C code - Walter uses C extensions in his
compilers that translate directly to matching assembly). But most of it
can be written perfectly well in C. For example, code to copy the
initialised data from flash to ram, and to zero the bss, can be written
in C.
I've written the startup code in C on the SDCC compiler and the small
C comiler. Basically the compiler did nothing and I had to do
everything. I basically wouldn't use this for professional work but
it was simple enough and I just managed everything.
--
Linux Home Automation Neil Cherry ncherry@xxxxxxxxxxx
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
Author of: Linux Smart Homes For Dummies
.
- References:
- mixing C and assembly
- From: Lax
- Re: mixing C and assembly
- From: Vladimir Vassilevsky
- Re: mixing C and assembly
- From: Walter Banks
- Re: mixing C and assembly
- From: Neil
- Re: mixing C and assembly
- From: Walter Banks
- Re: mixing C and assembly
- From: Neil
- Re: mixing C and assembly
- From: David Brown
- mixing C and assembly
- Prev by Date: Re: silRTOS Port on ARM9
- Next by Date: About mov instruction and gs register
- Previous by thread: Re: mixing C and assembly
- Next by thread: Re: mixing C and assembly
- Index(es):
Relevant Pages
|