#includesbit key1=P1^0;sbit key2=P1^1;sbit key3=P1^2;sbit key4=P1^3;sbit led1=P1^4;sbit led2=P1^5;sbit led3=P1^6;sbit led4=P1^7;main(){while(1) { led1=key1; led2=key2; led3=key3; led4=key4; }}
不知道你要控制发光二极管实现什么样的功能,说详细点才好