完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
ORG 0000H
LJMP START ORG 000BH LJMP TT0 ORG 0050H START: MOV SP,#07H MOV 36H,#00H MOV 40H,#00H MOV 41H,#59H MOV 42H,#23H MOV 30H,#00H MOV 31H,#00H MOV 32H,#09H MOV 33H,#05H MOV 34H,#03H MOV 35H,#02H MOV TMOD,#01H MOV TL0,#0B0H MOV TH0,#3CH MOV IE,#82H MOV 50H,#20H SETB TR0 LOOP: JB P1.0,N2 CALL DE MOV A,42H ADD A,#01H DA A MOV 42H,A CJNE A,#24H,N1 MOV 42H,#00H N1: JNB P1.0,$ CALL DE N2: JB P1.1,N4 CALL DE MOV A,41H ADD A,#01H DA A MOV 41H,A CJNE A,#60H,N3 MOV 41H,#00H N3: JNB P1.1,$ CALL DE N4: JB P1.2,N6 CALL DE MOV A,40H ADD A,#01H DA A MOV 40H,A CJNE A,#60H,N5 MOV 40H,#00H N5: JNB P1.2,$ CALL DE N6: JB P1.3,N8 CALL DE MOV R7,34H CJNE R7,#00H,N60 MOV R6,35H CJNE R6,#00H,N61 MOV 42H,#23H JMP N7 N60: MOV A,34H DEC A MOV 34H,A MOV A,35H SWAP A ADD A,34H MOV 42H,A JMP N7 N61: MOV 34H,#09H MOV A,35H DEC A SWAP A ADD A,34H MOV 42H,A N7: JNB P1.3,$ CALL DE N8: JB P1.4,N10 CALL DE MOV R7,32H CJNE R7,#00H,N80 MOV R6,33H CJNE R6,#00H,N81 MOV 41H,#59H JMP N9 N80: MOV A,32H DEC A MOV 32H,A MOV A,33H SWAP A ADD A,32H MOV 41H,A JMP N9 N81: MOV 32H,#09H MOV A,33H DEC A SWAP A ADD A,32H MOV 41H,A N9: JNB P1.4,$ CALL DE N10: JB P1.5,N11 CALL DE MOV R7,30H CJNE R7,#00H,N100 MOV R6,31H CJNE R6,#00H,N101 MOV 40H,#59H JMP N11 N100: MOV A,30H DEC A MOV 30H,A MOV A,31H SWAP A ADD A,30H MOV 40H,A JMP N11 N101: MOV 30H,#09H MOV A,31H DEC A MOV 31H,A SWAP A ADD A,30H MOV 40H,A N11: JNB P1.5,$ CALL DE TT0: MOV TH0,#3CH MOV TL0,#0B0H PUSH ACC PUSH PSW DJNZ 50H,tiNT0 CALL TIME CALL VIEW TINT0:CALL SCAN POP PSW POP ACC LJMP LOOP SCAN: MOV R0,#36 SCANO:MOV A,@R0 ADD A,#30H MOV R1,A MOV A,@R0 SWAP A ORL A,@R1 MOV P0,A CALL DELAY INC @R0 CJNE @R0,#06H,SCANO MOV @R0,#00H RET TIME: MOV A,40H ADD A,#01H DA A MOV 40H,A CJNE A,#60H,TTI MOV 40H,#00H MOV A,41H ADD A,#01H DA A MOV 41H,A MOV A,41H CJNE A,#60H,TTI MOV 41H,#00H MOV A,41H ADD A,#01H DA A MOV 42H,A CJNE A,#24H,TTI MOV 42H,#00H TTI: RET VIEW: MOV A,40H ANL A,#0FH MOV 30H,A MOV A,40H SWAP A ANL A,#0FH MOV 31H,A MOV A,41H ANL A,#0FH MOV 32H,A MOV A,41H SWAP A ANL A,#0FH MOV 33H,A MOV A,42H ANL A,#0FH MOV 34H,A MOV A,42H SWAP A ANL A,#0FH MOV 35H,A RET DELAY:MOV R7,#65 DJNZ R7,$ RET DE: MOV R4,#10 DE1: MOV R5,#100 DJNZ R5,$ DJNZ R5,DE1 RET END
|
|
相关推荐
3个回答
|
|
汇编一点都看不懂。
|
|
|
|
留个记号
|
|
|
|
改程序是要报酬的,尤其是汇编
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-LCD显示图片编程示例之介绍mmap
238 浏览 0 评论
《DNESP32S3使用指南-IDF版_V1.6》第二章 常用的C语言知识点
629 浏览 0 评论
【RA-Eco-RA2E1-48PIN-V1.0开发板试用】(第三篇)ADC采集+PWM输出
552 浏览 0 评论
《DNK210使用指南 -CanMV版 V1.0》第四十五章 人脸识别实验
552 浏览 0 评论
1074 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11763 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 23:24 , Processed in 0.464755 second(s), Total 43, Slave 35 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号