This is just a hunch, but I wonder if you actually mean this:-
disp_digits="0123";
This effectively assigns ASCII "0" to the first element, "1" to the second and
so on, with a null (ASCII 0) in disp_digits[4]. As you have written the code,
if the array is treated elsewhere as a string, starting with a true zero will
make it appear like an empty string.
Just a thought - it's such a common mistake that I thought it might be worth a
mention.
On Thursday 26 May 2011 09:15:41 KPL wrote:
> Yes, I added underscore yesterday.
>
> Actually I see I updated C code after asking here, to this:
>
> extern void DECODE(void);
> extern unsigned char disp_digits[5];
>
> void main()
> {
> disp_digits[0]=0;
> disp_digits[1]=1;
> disp_digits[2]=2;
> disp_digits[3]=3;
>
> DECODE();
>
>
> Then it compiles without errors, but does not work anyway.
> Will have to find out how to simulate it, to see what it's trying to do.
>
> On Thu, May 26, 2011 at 10:16, Maarten Brock <[email protected]>
wrote:
> > Hi,
> >
> > You probably need to add an undercore in assembly to disp_digits.
> >
> > Maarten
>
--
Richard.
PGP Key-id: 0x5AB3D350
All extremists should be taken out and shot.
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user