>
> Thanks.
>
> So there is no way of initializing it this way but without making it
> constant?
You want a variable that has a specific value each time execution
starts. What SDCC is doing will give you that semantic *on an embedded
device*.
SDCC starts off using .ds directives (equiv) and then
David Lucena schrieb:
> Thanks.
>
> So there is no way of initializing it this way but without making it constant?
sdcc is very bad at initializing variables effieciently. Just have a
look at feature request #1565720. sdcc will initialize global constant
arrays as it should and generate lots of c
Thanks.
So there is no way of initializing it this way but without making it constant?
.com files usually has this information saved in the file itself and when they
are loaded prior to
execution, the variables are already initialized this way. I know I can do this
in assembler,
because I have
David Lucena schrieb:
> I am using SDCC to program a z80 machine. When I create this code:
>
> unsigned char test = 0;
>
> It is assembled as follows:
>
> ld iy,#_test
> ld 0(iy),#0x00
>
> But I would like that it could be initialized as its done in assembler:
>
> test:
>
--- Peter Kuhar <[EMAIL PROTECTED]> escribió:
> Is this a global variable???
>
> On 9/30/07, David Lucena <[EMAIL PROTECTED]> wrote:
> >
> > I am using SDCC to program a z80 machine. When I create this code:
> >
> > unsigned char test = 0;
> >
> > It is assembled as follows:
> >
> > ld
Is this a global variable???
On 9/30/07, David Lucena <[EMAIL PROTECTED]> wrote:
>
> I am using SDCC to program a z80 machine. When I create this code:
>
> unsigned char test = 0;
>
> It is assembled as follows:
>
> ld iy,#_test
> ld 0(iy),#0x00
>
> But I would like that
I am using SDCC to program a z80 machine. When I create this code:
unsigned char test = 0;
It is assembled as follows:
ld iy,#_test
ld 0(iy),#0x00
But I would like that it could be initialized as its done in assembler:
test:
.db 0
Is there any way of forcing this beh