《2022年微机交通灯系统方案 .pdf》由会员分享,可在线阅读,更多相关《2022年微机交通灯系统方案 .pdf(10页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、个人资料整理仅限学习使用罗发强 张志伟 郑颖慧 朱浩立STACK SEGMENT STACK DW 256 DUP (? STACK ENDS DATA SEGMENT LA DB ? LB DB ? DATA ENDS CODE SEGMENT CODEASSUME CS:CODE, DS:DATA START: MOV AX,DATA MOV DS,AX MOV AL,81H OUT 63H,AL MOV AL,7BH OUT 60H,AL L16: IN AL,62H AND AL,01H JZ L16 CLI PUSH DS MOV AX,0000H MOV DS,AX MOV AX,
2、OFFSET IRQ7 ADD AX,2000H MOV SI,003CH MOV SI,AX MOV AX,0000H MOV SI,003EH MOV SI,AX POP DS IN AL,21H AND AL,7FH OUT 21H,AL STI LOOP1: MOV AL,0F8H OUT 60H,AL CALL LED MOV AL,0E7H OUT 60H,AL CALL LED1 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 1 页,共 10 页个人资料整理仅限学习使用MOV AL,1FH OUT 60H,AL CALL LED M
3、OV AL,0E7H OUT 60H,AL CALL LED1 JMP LOOP1 LED PROC PUSH CX PUSH AX MOV CX,64000 L15: MOV AL,0EFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,6DH OUT 61H,AL CALL JISHU CMP CX,56000 DEC CX JNB L15 L14: MOV AL,0EFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0DFH OU
4、T 62H,AL MOV AL,66H OUT 61H,AL CALL JISHU CMP CX,48000 DEC CX JNB L14 L13: MOV AL,0EFH OUT 62H,AL MOV AL,06H OUT 61H,AL 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 2 页,共 10 页个人资料整理仅限学习使用CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,4FH OUT 61H,AL CALL JISHU CMP CX,40000 DEC CX JNB L13 L12: MOV AL,0EFH
5、 OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,5BH OUT 61H,AL CALL JISHU CMP CX,32000 DEC CX JNB L12 L11: MOV AL,0EFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU CMP CX,24000 DEC CX JNB L11 L10: MOV AL,0EFH OUT 62H,A
6、L MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0DFH 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 3 页,共 10 页个人资料整理仅限学习使用OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU CMP CX,16000 DEC CX JNB L10 L09: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,6FH OUT 61H,AL CALL J
7、ISHU CMP CX,8000 DEC CX JNB L09 MOV CX,64000 L08: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,7FH OUT 61H,AL CALL JISHU CMP CX,56000 DEC CX JNB L08 L07: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL 精选学习资料 - - - - - - - - - 名
8、师归纳总结 - - - - - - -第 4 页,共 10 页个人资料整理仅限学习使用MOV AL,07H OUT 61H,AL CALL JISHU CMP CX,48000 DEC CX JNB L07 L06: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,7DH OUT 61H,AL CALL JISHU CMP CX,40000 DEC CX JNB L06 L05: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL C
9、ALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,6DH OUT 61H,AL CALL JISHU CMP CX,32000 DEC CX JNB L05 L04: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,66H OUT 61H,AL 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 5 页,共 10 页个人资料整理仅限学习使用CALL JISHU CMP CX,24000 DEC CX
10、JNB L04 L03: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,4FH OUT 61H,AL CALL JISHU CMP CX,16000 DEC CX JNB L03 L02: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,5BH OUT 61H,AL CALL JISHU CMP CX,8000 DEC CX JNB L02 L01
11、: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU CMP CX,1 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 6 页,共 10 页个人资料整理仅限学习使用DEC CX JNB L01 MOV AL,00H OUT 61H,AL POP AX POP CX LED ENDP LED1 PROC PUSH CX PUSH AX MOV CX,24000 L3: MOV A
12、L,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,4FH OUT 61H,AL CALL JISHU MOV AL,0E7 OUT 60H,AL CMP CX,20000 DEC CX JNB L3 L30: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,4FH OUT 61H,AL CALL JISHU MOV AL,0FFH OUT 60H,AL CMP
13、CX,16000 DEC CX JNB L30 L2: 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 7 页,共 10 页个人资料整理仅限学习使用MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,5BH OUT 61H,AL CALL JISHU MOV AL,0E7H OUT 60H,AL CMP CX,12000 DEC CX JNB L2 L20: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OU
14、T 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,5BH OUT 61H,AL CALL JISHU MOV AL,0FFH OUT 60H,AL CMP CX,8000 DEC CX JNB L20 L1: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,06H OUT 61H,AL CALL JISHU MOV AL,0F7H OUT 60H,AL 精选学习资料 - - - - - - - - - 名师归纳总结 - -
15、 - - - - -第 8 页,共 10 页个人资料整理仅限学习使用CMP CX,4000 DEC CX JNB L1 L100: MOV AL,0EFH OUT 62H,AL MOV AL,3FH OUT 61H,AL CALL JISHU MOV AL,0DFH OUT 62H,AL MOV AL,5BH OUT 61H,AL CALL JISHU MOV AL,0FFH OUT 60H,AL CMP CX,1 DEC CX JNB L100 POP AX POP CX RET LED1 ENDP JISHU PROC PUSH AX MOV AL,0B0H OUT 43H,AL MOV AX,11900 OUT 42H,AL MOV AL,AH OUT 42H,AL A1: IN AL,62H AND AL,08H CMP AL,0 JZ A1 POP AX RET JISHU ENDP IRQ7: MOV AL,1FH OUT 60H,AL JMP IRQ7 IRET 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 9 页,共 10 页个人资料整理仅限学习使用CODE ENDS END START 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 10 页,共 10 页