It should be even simpler:
#define light P2_0

When you write just use: light = val;

--
Ori Idan


On 2/22/07, Raphael Neider < rneider@web.de> wrote:
Hi,

> 2. sbit light = P2_0 (instead of P2^0 for keil)

This line creates a new sbit variable, initialized with P2_0, you
probably want something like
        sbit __at(P2_0) light;

I am no mcs51 expert, but this is a common error. Maybe you need to use
__at(&P2_0), but I am not so sure.

HTH,
Raphael



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net 's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user