《流水灯汇编程序.doc》由会员分享,可在线阅读,更多相关《流水灯汇编程序.doc(33页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、 ORG 0000H LJMP MAIN ORG 0100HMAIN: MOV R0,#00HLOOP: MOV A,R0 MOV DPTR,#TAB0 MOVC A,A+DPTR MOV P0,A MOV A,R0 MOV DPTR,#TAB1 MOVC A,A+DPTR MOV P1,A MOV A,R0 MOV DPTR,#TAB2 MOVC A,A+DPTR MOV P2,A MOV A,R0 MOV DPTR,#TAB3 MOVC A,A+DPTR MOV P3,A LCALL DELAY INC R0 CJNE R0,#240,LOOP MOV R0,#00H LOOP1:MOV
2、A,R0 MOV DPTR,#TAB01 MOVC A,A+DPTR MOV P0,A MOV A,R0 MOV DPTR,#TAB02 MOVC A,A+DPTR MOV P1,A MOV A,R0 MOV DPTR,#TAB03 MOVC A,A+DPTR MOV P2,A MOV A,R0 MOV DPTR,#TAB04 MOVC A,A+DPTR MOV P3,A LCALL DELAY1 INC R0 CJNE R0,#240,LOOP1 MOV R0,#00H LOOP2:MOV A,R0 MOV DPTR,#TAB001 MOVC A,A+DPTR MOV P0,A MOV A,
3、R0 MOV DPTR,#TAB002 MOVC A,A+DPTR MOV P1,A MOV A,R0 MOV DPTR,#TAB003 MOVC A,A+DPTR MOV P2,A MOV A,R0 MOV DPTR,#TAB004 MOVC A,A+DPTR MOV P3,A LCALL DELAY2 INC R0 CJNE R0,#240,LOOP2 MOV R0,#00HLOOP3:MOV A,R0 MOV DPTR,#TAB0001 MOVC A,A+DPTR MOV P0,A MOV A,R0 MOV DPTR,#TAB0002 MOVC A,A+DPTR MOV P1,A MOV
4、 A,R0 MOV DPTR,#TAB0003 MOVC A,A+DPTR MOV P2,A MOV A,R0 MOV DPTR,#TAB0004 MOVC A,A+DPTR MOV P3,A LCALL DELAY2 INC R0 CJNE R0,#144,LOOP3 MOV R0,#00HLOOP4:MOV A,R0 MOV DPTR,#TAB00001 MOVC A,A+DPTR MOV P0,A MOV A,R0 MOV DPTR,#TAB00002 MOVC A,A+DPTR MOV P1,A MOV A,R0 MOV DPTR,#TAB00003 MOVC A,A+DPTR MOV
5、 P2,A MOV A,R0 MOV DPTR,#TAB00004 MOVC A,A+DPTR MOV P3,A LCALL DELAY3 INC R0 CJNE R0,#144,LOOP4 MOV R0,#00H LJMP MAIN DELAY:MOV R7,#200 D01:MOV R6,#180 NOP D02:DJNZ R6,D02 DJNZ R7,D01 RETDELAY1:MOV R7,#200 D11:MOV R6,#200 NOP D12:DJNZ R6,D12 DJNZ R7,D11 RETDELAY2:MOV R7,#250 D111:MOV R6,#250 NOP D11
6、2:DJNZ R6,D12 DJNZ R7,D11 RETDELAY3:MOV R7,#2 D1:MOV R6,#200 D2:MOV R5,#123 NOP D3:DJNZ R5,D3 DJNZ R6,D2 DJNZ R7,D1TAB0:DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,1
7、1111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11
8、111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00111111B,10011111B,11001111B,11100111B,11110011B,11111001B,11111100B,11111110B DB 11111000B,11110001B,11100011B,11000111B,11001111B,00011111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,
9、11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10001111B,11000111B,11100111B,11100011B,11111000B,11111100B,11111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B D
10、B 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B
11、,11111111B,11111111B,11111111B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 11111110B,11111101B,11111011B,11110111B,11101111B,11011111B,10111111B,01111111B DB 01111111B,10111111B,11011111B,11101111B,11110111B,11111011B,11111101B,11111110B DB 00111111B,1001111
12、1B,11001111B,11100111B,11110011B,11111001B,11111100B,01111110B DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,01111110B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111
13、B,01111111B DB 00001111B,11000011B,11100001B,11110000B,11110001B,11111000B,11111100B,11111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 00000111B,11000001B,11100000B,11110000B,11110001B,11111000B,11111100B,11111110B DB 11110000B,11100001B,11000011B,100001
14、11B,00001111B,00011111B,00111111B,01111111B DB 00000011B,10000001B,11000000B,11100000B,11110000B,11111000B,11111100B,11111110B DB 11000000B,10000001B,00000011B,00000111B,00001111B,00011111B,00111111B,01111111B TAB1:DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB
15、 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00111111B,10011111B,11001111B,11100111B,11110011B,11111001B,11111100B,11111110B DB 11111100B,11111001B,11110011B,11100111B,11001111B,
16、10011111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111000B,11110001
17、B,11100011B,11000111B,11000111B,10001111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10011111B,11000111B,11100011B,11110001B,11111000B,11111100B
18、,11111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10001111B,11000111B,1110001
19、1B,11110001B,11111000B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 01111111B,10111111B,11011111B,11101111B,11110111B,11111011B,11111101B,11111110B DB 11111
20、110B,11111101B,11111011B,11110111B,11101111B,11011111B,10111111B,01111111B DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,01111110B DB 00111111B,10011111B,11001111B,11100111B,11110011B,11111001B,11111100B,01111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,000111
21、11B,00111111B,01111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11110000B,11100001B,11000011B,10000111B,00001111B,00011111B,00111111B,01111111B DB 00001111B,10000111B,11000011B,11100001B,11110000B,11111000B,11111100B,11111110B DB 11100000B,11000001B,1000
22、0011B,00000111B,00001111B,00011111B,00111111B,01111111B DB 00000111B,10000011B,11000001B,11100000B,11110000B,11111000B,11111100B,11111110B DB 11000000B,10000001B,00000011B,00000111B,00001111B,00011111B,00111111B,01111111B DB 00000011B,10000001B,11000000B,11100000B,11110000B,11111000B,11111100B,11111
23、110B TAB2:DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00111111B,10011111B,11001111B,11100111B,11110011B,11111001B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111
24、B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,01111111B DB 111111
25、11B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111000B,11110001B,11100011B,11010111B,10001111B,0001111
26、1B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111000B,11110001B,11100
27、011B,11010111B,10001111B,00011111B,00111111B,01111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,000000
28、00B DB 01111111B,10111111B,11011111B,11101111B,11110111B,11111011B,11111101B,11111110B DB 11111110B,11111101B,11111011B,11110111B,11101111B,11011111B,10111111B,01111111B DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,01111110B DB 00111111B,10011111B,11001111B,11100111B,1111
29、0011B,11111001B,11111100B,01111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11110000B,11100001B,11000011B,10000111B,00001111B,00011111B,00111111B,01111111B DB 00001111B,10
30、000111B,11000011B,11100001B,11110000B,11111000B,11111100B,11111110B DB 11100000B,11000001B,10000011B,00000111B,00001111B,00011111B,00111111B,01111111B DB 00000111B,10000011B,11000001B,11100000B,11110000B,11111000B,11111100B,11111110B DB 11000000B,10000001B,00000011B,00000111B,00001111B,00011111B,001
31、11111B,01111111B DB 00000011B,10000001B,11000000B,11100000B,11110000B,11111000B,11111100B,11111110B TAB3:DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 00111111B,10011111B,110011
32、11B,11100111B,11110011B,11111001B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111100B,11111001B,11110011B,11100111B,11001111B,10011111B,00111111B,0111111
33、1B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111000B,11110001B,11100011B,11000111B,10001
34、111B,00011111B,00111111B,01111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111000B,111
35、10001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,1111
36、1111B,11111111B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 01111111B,10111111B,11011111B,11101111B,11110111B,11111011B,11111101B,11111110B DB 11111110B,11111101B,11111011B,11110111B,11101111B,11011111B,10111111B,01111111B DB 11111100B,11111001B,11110011B,11
37、100111B,11001111B,10011111B,00111111B,01111110B DB 00111111B,10011111B,11001111B,11100111B,11110011B,11111001B,11111100B,01111110B DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 00011111B,10001111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB
38、11110000B,11100001B,11000011B,10000111B,00001111B,00011111B,00111111B,01111111B DB 00001111B,10000111B,11000011B,11100001B,11110000B,11111000B,11111100B,11111110B DB 11100000B,11000001B,10000011B,00000111B,00001111B,00011111B,00111111B,01111111B DB 00000111B,10000011B,11000001B,11100000B,11110000B,1
39、1111000B,11111100B,11111110B DB 11000000B,10000001B,00000011B,00000111B,00001111B,00011111B,00111111B,01111111B DB 00000011B,10000001B,11000000B,11100000B,11110000B,11111000B,11111100B,11111110BTAB01:DB 11111000B,11110001B,11100011B,11000111B,10001111B,00011111B,00111111B,01111111B DB 11111111B,1111
40、1111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111
41、111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 01111111B,10011111B,11000111B,11100011B,11110001B,11111000B,11111100B,11111110B DB 11111110B,11111100B,11111000B,111
42、10000B,11100000B,11000000B,10000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 1
43、1111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B,11111111B DB 01111111B,00111111B,00011111B,00001111B,00000111B,00
44、000011B,00000001B,00000000B DB 11111110B,11111100B,11111000B,11110000B,11100000B,11000000B,10000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,00000000B DB 00000000B,00000000B,00000000B,00000000B,00000000B,00000000B,0000000