piclist 2008\07\26\165605a >
Thread: Starting with C
face BY : sergio masci email (remove spam text)

On Sat, 26 Jul 2008, Gerhard Fiedler wrote:

{Quote hidden}

Only for the scope of the function call.

> > and 2 certainly is a constant so yes you could compute the address of
> > arr[2] at compile time and reference that direectly at run time.
> I'm pretty sure most decent compilers optimize it to that.

No adding the stack frame pointer?

{Quote hidden}

yes you can assume that about "main" because it is a very special case.
But focusing on "main" doesn't get you very far in terms of overall

> > What you are advocating is the use of a static compile time stack instead
> > of a dynamic runtime stack.
> I don't know how many compilers for smaller PICs use it, but for example
> Hi-Tech's PICC uses a compiled stack.

Really, I didn't know that. Is this documented anywhere?

> Main limitations are with re-entrancy
> (not provided) and function pointers (some limitations),

So do they have any special mechanism to do multitasking?

> not with data
> pointers.

Does this mean that a data pointer can handle both RAM and CODE space data
at the same time?

Sergio Masci

seeking: better designed
<Pine.LNX.4.61.0807262343040.31369@yoda.srts.co.uk> 7bit

In reply to: <gz8lhzv14mk4.dlg@connectionbrazil.com>
See also: www.piclist.com/techref/microchip/languages.htm?key=c
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Starting with C

month overview.

new search...