I basically want to achieve the same as I had in asm, that ir, each
sequential byte having respective number in it. This is not meant to
be a string, just 4 bytes in a row, starting with address of
Seems like using double quotes was wrong.
I just checked asm code produced by sdcc from that, it is the same as
the original that I had in asm. So, if it still does not work, I have
to look for another error somewhere else.
.line 37; "main_lcd_disp.c" disp_digits=0;
CLRF (_disp_digits + 0)
.line 38; "main_lcd_disp.c" disp_digits=1;
MOVWF (_disp_digits + 1)
.line 39; "main_lcd_disp.c" disp_digits=2;
MOVWF (_disp_digits + 2)
.line 40; "main_lcd_disp.c" disp_digits=3;
MOVWF (_disp_digits + 3)
.line 42; "main_lcd_disp.c" DECODE();
I am not using that variable anywhere in C yet, it is just defined
there, and used by asm module (where it is defined), byte-by-byte.
On Thu, May 26, 2011 at 15:19, Richard Gray
> This is just a hunch, but I wonder if you actually mean this:-
> This effectively assigns ASCII "0" to the first element, "1" to the second and
> so on, with a null (ASCII 0) in disp_digits. 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