Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-10-03 Thread wittb
> > 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

Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-10-02 Thread Philipp Klaus Krause
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

Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-10-01 Thread David Lucena
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

Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-10-01 Thread Philipp Klaus Krause
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: >

Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-09-30 Thread David Lucena
--- 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

Re: [Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-09-30 Thread Peter Kuhar
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

[Sdcc-user] Auto assign variable value through assembler directive instead of code

2007-09-30 Thread David Lucena
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