部分源程序如下: void main() { P2=0x7f; while(1) { key=keyscan( ); if(key!=0xff) { P0=ledcode[key]; while(key!=0xff); do { delay5ms( );