Re: mixing C and assembly
- From: Walter Banks <walter@xxxxxxxxxxxxx>
- Date: Wed, 23 Apr 2008 14:27:49 -0400
Stefan Reuther wrote:
register_sp SP;
SP = int_value;
What you're doing here is writing assembly with C syntax. It relies upon
a heavily non-standard language extension, and makes assumptions about
how the compiler behaves (you don't want the compiler to use the stack
before your SP assignment, do you?). So instead of writing assembly in
C, I prefer using the real thing.
I actually agree with you it is very low level C. The purpose of ISO/IEC
18037 was to define the low level syntax. Most start up code is very processor
family specific. Writting start up code in C makes good use of C's
optimization like the branch/jump to main.
w..
.
- Follow-Ups:
- Re: mixing C and assembly
- From: Stefan Reuther
- Re: mixing C and assembly
- From: cbarn24050
- Re: mixing C and assembly
- References:
- mixing C and assembly
- From: Lax
- Re: mixing C and assembly
- From: Hans-Bernhard Bröker
- Re: mixing C and assembly
- From: Chris H
- Re: mixing C and assembly
- From: Walter Banks
- Re: mixing C and assembly
- From: Mark Borgerson
- Re: mixing C and assembly
- From: Walter Banks
- Re: mixing C and assembly
- From: Stefan Reuther
- mixing C and assembly
- Prev by Date: Re: Getting fit with embedded systems
- Next by Date: Re: mixing C and assembly
- Previous by thread: Re: mixing C and assembly
- Next by thread: Re: mixing C and assembly
- Index(es):
Relevant Pages
|