#i nclu d e<re g 51、h> uns i gned int x,y; void d ela y ms(un s ign ed i nt z) //延时{ﻩunsi g ned i n t i,j; ﻩfor(i=z;i>0;i--) ﻩﻩf or(j=150;j>0;j--); } v o id O n_all() //开启所有灯{ ﻩP0=0 x00; P1=0 x 00; P2=0x0 0; P 3=0 x00; } void Off_all()//关闭所有灯{ ﻩﻩP0=0 xff; P 1=0x f f; P 2=0xff; P3=0x f f; }v oi d ls()//正向流水灯{ P0=0 x 00; d e laym s(400);ﻩP2=0x0 0; del a ym s(400);P3=0x0 0; de la y ms(4 00);ﻩP 1=0x00; delaym s(40 0); ﻩP 0=0 x 01; d el ay ms(50); ﻩP0=0 x 02; d e l ay m s(5 0); P0=0x 04; de la yms(50); P 0=0x08; delayms(50); P0=0x1 0; d e la y ms(5 0); ﻩP0=0x2 0; delayms(50); ﻩP 0=0x 4 0; d e l a yms(5 0); P0=0x80; d e la y ms(5 0); P 0=0 x0 0; ﻩP2=0 x 0 1; del a yms(5 0); P2=0 x 02; delayms(5 0); P2=0x0 4; de l a ym s(50); P 2=0x08; del a ym s(5 0); P2=0x1 0; d e la y m s(50); P2=0x20; dela y ms(5 0); ﻩP2=0 x4 0; del a yms(50); ﻩP2=0x80; d e la ym s(50); ﻩP 2=0 x 00; ﻩP 3=0x 80; del a ym s(50); ﻩP3=0 x40; d ela y ms(5 0); P 3=0 x2 0; de la yms(50); ﻩP 3=0 x10; de l ayms(50); ﻩP 3=0 x0 8; d ela y ms(50); ﻩP3=0x0 4; delay ms(50); P3=0 x02; delay m s(50); ﻩP3=0x 01; d e la yms(50); ﻩP3=0x 00; ﻩP1=0 x 80; delaym s(5 0); ﻩP1=0x40; d e lay m s(50); P1=0 x20; d elayms(5 0); P1=0x10; de l ay m s(5 0); P 1=0x08; delayms(50); P1=0 x0 4; de layms(50); ﻩP1=0 x02; delay m s(5 0); P1=0x01; delay ms(50); ﻩP1=0x00;ﻩOf f_a l l();ﻩP0=0xfe; d e lay m s(50);P0=0xfd; d elaym s(50);ﻩP0=0xf b; d e ...