单片机小星星
单片机小星星org 0000h ljmp main org 0050h main: mov p1,#01h ;点亮第一个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#01h ;点亮第一个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#1fh ;点亮前5个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#1fh ;点亮前5个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#3fh ;点亮前6个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#3fh ;点亮前6个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#1fh ;点亮前5个灯 lcall delay1 lcall delay1 ;延时1s mov p1,#00h ;灭灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#0fh ;点亮前4个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#0fh ;点亮前4个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#07h ;点亮前3个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#07h ;点亮前3个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#03h ;点亮前2个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#03h ;点亮前2个灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#00h ;灭灯 lcall delay2 ;调用子程序2,延时0.2s mov p1,#01h ;点亮第一个灯 lcall delay1 lcall delay1 ;调用子程序1,延时1s mov p1,#00h ;灭灯 lcall delay1 ;调用子程序1,延时0.5s mov p1,#1fh