完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
ORG 0000H AJMP MAIN ORG 0013H LJMP IN1 ORG 0030H MAIN:MOV SP,#60H MOV P1,#0FH SETB P1.4 SETB EA SETB EX1 MOV 5AH,#0 MOV 5BH,#2 MOV 5CH,#5 MOV 5DH,#0 MOV 28H,#0 MOV TCON,#05H MOV 29H,#01H MOV 35H,#10 MOV 37H,#10 LOOP:MOV A,35H CJNE A,#1,NEXT LJMP N1 NEXT:LCALL AD MOV R2,#0 MOV R3,40H LCALL Q1 MOV 3AH,R2 MOV 3BH,R3 LCALL BJ LCALL DIR LCALL tiM LJMP LOOP NI:LCALL SD N4:MOV A,35H CJNE A,#2,N2 MOV A,R4 ADD A,#1 MOV 52H,A CLR C MOV A,R4 SUBB A,#1 MOV 53H,A MOV A,31H MOV 5AH,A MOV A,32H MOV 5BH,A MOV A,33H MOV 5CH,A MOV A,34H MOV 5DH,A RET IN1:PUSH PSW PUSH ACC CLR EX1 MOV A,P1 RRC A JC M1 MOV 35H,#1 LJMP TT M1:RRC A JC M2 MOV 35H,#2 MOV A,28H SETB ACC.0 MOV 28H,A LJMP TT M2:RRC A JC M3 MOV 35H,#3 MOV A,28H SETB ACC.0 MOV 28H,A LJMP TT M3:RRC A JC TT MOV 35H,#4 TT:NOP POP ACC POP PSW SETB EX1 RETI AD1:MOV A,37H ANL A,#0FH ORL A,#30H MOV R1, A MOV A,@R1 INC A MOV B,#10 DIV AB MOV A,B MOV @R1,A RET IDB:MOV 30H,#0 MOV R0,#30H MOV R2,#3 MOV R3,#0 MOV A,@R0 MOV R4,A LP:MOV A,R4 MOV B,#10 MUL AB MOV R4,A MOV A,#10 XCH A,B XCH A,R3 MUL AB ADD A,R3 XCH A,R4 INC R0 ADD A,@R0 XCH A,R4 ADDC A,#0 MOV R3,A DJNZ R2,LP RET BJ:MOV 30H,#0 MOV A,40H CLR C SUBB A,52H JC XX SETB P1.4 RET XX:MOV A,40H CLR C SUBB A,53H JNC WW CLR P1.4 WW:RET Q1:MOV DPTR,#TABLE MOV A,R3 CLR C RLC A MOV R3,A XCH A,R2 RLC A XCH A,R2 ADD A,DPL MOV DPL,A MOV A,DPH ADDC A,R2 MOV DPH,A CLR A MOVC A,@A+DPTR MOV R2,A CLR A INC DPTR MOVC A,@A+DPTR MOV R3,A RET TABLE: DW 000,045,051,056,062,066 DW 070,074,081,086,092 DW 098,100,105,110,116 DW 121,124,130,135,138 DW 142,146,151,154,160 DW 165,168,170,175,178 DW 180,184,190,193,195 DW 208,214,220,224,229 DW 232,238,242,250,255 DW 260,264,271,275,280 DW 284,292,294,295,300 DW 306,311,316,321,325 DW 330,334,338,343,347 DW 350,355,360,362,364 DW 366,368,370,375,376 DW 378,379,380,382,384 DW 385,387,388,389,390 DW 392,395,396,399,400 DW 402,403,405,406,408 DW 410,412,414,416,418 DW 419,420,422,423,425 DW 427,428,430,432,436 DW 438,439,440,442,444 DW 445,446,449,450,452 DW 438,440,442,446,448 DW 450,452,453,455,456 DW 458,461,463,465,468 DW 468,470,472,475,478 DW 480,480,482,485,485 DW 488,490,491,493,495 DW 498,500,500,501,504 DW 505,508,510,512,515 DW 518,518,522,524,528 DW 532,536,540,540,545 DW 548,549,551,554,556 DW 559,560,562,565,568 DW 570,572,573,575,578 DW 580,583,585,588,590 DW 595,596,598,600,602 DW 608,610,610,612,615 DW 620,623,625,628,630 DW 632,635,640,642,645 DW 648,650,652,655,658 DW 660,664,665,668,672 DW 675,677,680,685,688 DW 690,695,700,705,710 DW 712,715,718,720,725 DW 769,773,775,780,782 DW 810,815,818,820 NDIV1:MOV A,R3 CLR C SUBB A,R7 MOV A,R2 SUBB A,R6 JNC NDVE1 MOV B,#16 NDVL1:CLR C MOV A,R5 RLC A MOV R5,A MOV A,R4 RLC A MOV R4,A MOV A,R3 RLC A MOV R3,A XCH A,R2 RLC A XCH A,R2 MOV F0,C CLR C SUBB A,R7 MOV R1,A MOV A,R2 SUBB A,R6 JB F0,NDVM1 JC NDVD1 NDVM1:MOV R2,A MOV A,R1 MOV R3,A INC R5 NDVD1:DJNZ B,NDVL1 CLR F0 RET NDVE1:SETB F0 RET |
|
相关推荐
1个回答
|
|
自己对照着慢慢一点一点的写注释。这种工作,别人不可能帮你的。
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
464 浏览 0 评论
478 浏览 1 评论
基于瑞萨FPB-RA4E2智能床头灯项目——1编译环境搭建与点亮驱动ws2812全彩LED
439 浏览 0 评论
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-LCD显示图片编程示例之介绍mmap
994 浏览 0 评论
《DNESP32S3使用指南-IDF版_V1.6》第二章 常用的C语言知识点
1056 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11780 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 11:13 , Processed in 0.595299 second(s), Total 76, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号