|
From: Maarten B. <sou...@ds...> - 2010-02-01 10:29:30
|
Hi, I wanted to reply: __sbit __at (&PSW + 7) CY; But that also doesn't seem to work. So the only option is to do the math yourself. Maarten > hi, > what about: > > __sbit__ at (0xD7) CY; > > ? > > On Sun, Jan 31, 2010 at 10:16 AM, Grissiom <cha...@gm...> wrote: > >> Hello all, >> >> I want to define a sbit in a sfr. Here is the code, which is for a 8051: >> >> __sfr __at (0xD0) PSW; >> __sbit __at (PSW + 7) CY; >> ... >> >> But sdcc(20100130-5661) complains: >> >> error 2: Initializer element is not constant >> >> So how to define a sbit in sfr easily? >> >> Thanks in advance. >> >> -- >> Cheers, >> Grissiom |