完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
LNUM EQU 30H
ORG 0000H JMP START ORG 0100H START:MOV SP,#5FH MOV R7,#0FEH MOV R2,#0 MOV 50H,#0 MOV 51H,#0 MOV 52H,#0 MOV LNUM,#4 CLR F0 ST1:CALL MAKEY JNB F0,ST1 MOV P2,R7 ANL A,#0FH MOV DPTR,#LED_A MOVC A,@A+DPTR MOV P0,A CJNE R2,#1H,Y1 JMP LOOP1 CJNE R2,#2H,Y1 JMP LOOP2 CJNE R2,#3H,Y1 JMP LOOP3 CJNE R2,#4H,Y1 JMP LOOP4 loop1:CJNE A,#0,NEXT1 MOV 50H,A NEXT1:CJNE A,#1,NEXT2 MOV 50H,A NEXT2:CJNE A,#2,NEXT3 MOV 50H,A NEXT3:CJNE A,#3,NEXT4 MOV 50H,A NEXT4:CJNE A,#4,NEXT5 MOV 50H,A NEXT5:CJNE A,#5,NEXT6 MOV 50H,A NEXT6:CJNE A,#6,NEXT7 MOV 50H,A NEXT7:CJNE A,#7,NEXT8 MOV 50H,A NEXT8:CJNE A,#8,NEXT9 MOV 50H,A NEXT9:CJNE A,#9,NEXT10 MOV 50H,A NEXT10:CJNE A,#0AH,NEXT11 JMP Y1 NEXT11:CJNE A,#0BH,NEXT12 JMP Y1 NEXT12:CJNE A,#0CH,NEXT13 JMP Y1 NEXT13:CJNE A,#0DH,NEXT14 JMP Y1 NEXT14:CJNE A,#0EH,NEXT15 JMP Y1 NEXT15:JMP Y1 LOOP2:CJNE A,#0,NEXT110 JMP Y1 NEXT110:CJNE A,#1,NEXT22 JMP Y1 NEXT22:CJNE A,#2,NEXT32 JMP Y1 NEXT32:CJNE A,#3,NEXT44 JMP Y1 NEXT44:CJNE A,#4,NEXT55 JMP Y1 NEXT55:CJNE A,#5,NEXT66 JMP Y1 NEXT66:CJNE A,#6,NEXT77 JMP Y1 NEXT77:CJNE A,#7,NEXT88 JMP Y1 NEXT88:CJNE A,#8,NEXT99 JMP Y1 NEXT99:CJNE A,#9,NEXT100 JMP Y1 NEXT100:CJNE A,#0AH,NEXT111 JMP Y1 NEXT111:CJNE A,#0BH,NEXT122 MOV 52H,#1 NEXT122:CJNE A,#0CH,NEXT133 JMP Y1 NEXT133:CJNE A,#0DH,NEXT144 JMP Y1 NEXT144:CJNE A,#0EH,NEXT155 JMP Y1 NEXT155:JMP Y1 loop3:CJNE A,#0,NEXT1111 MOV 51,A NEXT1111:CJNE A,#1,NEXT2222 MOV 51H,A NEXT2222:CJNE A,#2,NEXT3333 MOV 51H,A NEXT3333:CJNE A,#3,NEXT4444 MOV 51H,A NEXT4444:CJNE A,#4,NEXT5555 MOV 51H,A NEXT5555:CJNE A,#5,NEXT6666 MOV 51H,A NEXT6666:CJNE A,#6,NEXT7777 MOV 51H,A NEXT7777:CJNE A,#7,NEXT8888 MOV 51H,A NEXT8888:CJNE A,#8,NEXT9999 MOV 51H,A NEXT9999:CJNE A,#9,NEXT10000 MOV 51H,A NEXT10000:CJNE A,#0AH,NEXT11111 JMP Y1 NEXT11111:CJNE A,#0BH,NEXT12222 JMP Y1 NEXT12222:CJNE A,#0CH,NEXT13333 JMP Y1 NEXT13333:CJNE A,#0DH,NEXT14444 JMP Y1 NEXT14444:CJNE A,#0EH,NEXT15555 JMP Y1 NEXT15555:JMP Y1 loop4:CJNE A,#0,NEXT121 JMP Y1 NEXT121:CJNE A,#1,NEXT23 JMP Y1 NEXT23:CJNE A,#2,NEXT34 JMP Y1 NEXT34:CJNE A,#3,NEXT43 JMP Y1 NEXT43:CJNE A,#4,NEXT53 JMP Y1 NEXT53:CJNE A,#5,NEXT63 JMP Y1 NEXT63:CJNE A,#6,NEXT73 JMP Y1 NEXT73:CJNE A,#7,NEXT83 JMP Y1 NEXT83:CJNE A,#8,NEXT93 JMP Y1 NEXT93:CJNE A,#9,NEXT103 JMP Y1 NEXT103:CJNE A,#0AH,NEXT113 JMP Y1 NEXT113:CJNE A,#0BH,NEXT123 JMP Y1 NEXT123:CJNE A,#0CH,NEXT134 JMP Y1 NEXT134:CJNE A,#0DH,NEXT143 JMP Y1 NEXT143:CJNE A,#0EH,NEXT153 JMP Y1 NEXT153:JMP Y2 Y1:CLR F0 MOV P0,#0FFH JMP START Y2:MOV R2,50H DJNZ R2,Y1 JMP Z1 Z1:MOV A,#50H ADD A,#51H JMP START MAKEY:CALL KEYHN JNZ HAVE JMP NRET HAVE:CALL D10 CALL KEYHN JNZ TRUE JMP NRET TRUE:MOV R1,#0EFH MOV R4,#0 SCAN:MOV A,R1 MOV P3,A MOV A,P3 JB ACC.0,L1 MOV A,#0 JMP KEYNUM L1:JB ACC.1,L2 MOV A,#4 JMP KEYNUM L2:JB ACC.2,L3 MOV A,#8 JMP KEYNUM L3:JB ACC.3,NEXT MOV A,#0CH KEYNUM:ADD A,R4 PUSH ACC UPKEY:CALL KEYHN JNZ UPKEY POP ACC SETB F0 JMP HRET NRET:CLR F0 HRET:RET NEXT:INC R4 MOV A,R1 DJNZ LNUM,NDONE JMP NRET NDONE:RL A MOV R1,A JMP SCAN KEYHN:MOV P3,#0FH MOV A,P3 CPL A ANL A,#0FH RET D10:MOV R5,#10 D1:MOV R6,#249 DL:NOP NOP DJNZ R6,DL DJNZ R5,D1 RET LED_A: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H DB 80H,90H,88H,83H,0C6H,0A1H,86H,8EH TAB1: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H DB 80H,90H,88H,83H,0C6H,0A1H,86H,8EH END 这是我使用汇编语言设计的一个简易的计算器仅仅只可以实现一位加法运算,但是程序无法实现总是提示报错。请求各位大神解答!!!谢谢!!! |
|
相关推荐
8个回答
|
|
还在用汇编啊 真心看不懂
|
|
|
|
额 你为毛要汇编啊
|
|
|
|
还是用c编吧,年轻人用汇编的不多。
|
|
|
|
提示错误 里面有些 哪里出错了啊 你可以看提示啊
|
|
|
|
|
|
|
|
{:14:}{:14:}
|
|
|
|
这汇编程序真心伤不起。。话说你错误都没告诉我们,我们肯定不会去全部读你的汇编代码啊。。大家时间都宝贵。。
|
|
|
|
还有人用汇编???
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-LCD显示图片编程示例之介绍mmap
180 浏览 0 评论
《DNESP32S3使用指南-IDF版_V1.6》第二章 常用的C语言知识点
587 浏览 0 评论
【RA-Eco-RA2E1-48PIN-V1.0开发板试用】(第三篇)ADC采集+PWM输出
549 浏览 0 评论
《DNK210使用指南 -CanMV版 V1.0》第四十五章 人脸识别实验
548 浏览 0 评论
1051 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11763 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 17:03 , Processed in 0.721241 second(s), Total 88, Slave 69 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号