On Tue, 2012-07-24 at 11:11 +0200, Maarten Brock wrote:
> Roelof,
> 
> Is there a reason why you use this "poor man's malloc"?

Because I have been trying to get this pointer thing to
work for ages now and that was the best I could come up
with. First time, long ago, I tried it would not work so
I implemented a large array and had #defines for the
different positions in the header file. But that annoyed
me to the extent that I wanted to change it to a structure
so I started trying again a few weeks ago.


> You could also just place a struct variable in memory.

That works right out of the box :-)


> And unless you use its contents in 
> an ISR or asm you don't need volatile either.

So, if I read this right I do not have to make the variable
volatile and can still use it in an ISR (and all the other
c files).

Anyway, dank je wel !

roelof



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to