在用keil汇编程序的时候老是提示zhuanhuan是未定义的符号,就通不过,程序见下面:
RSEQUP1.2;赋值RWEQUP1.0EEQUP1.1CLOCKEQUP1.4CSEQUP1.7OUTEQUP1.6INEQUP1.5MOV50H,#31H;数字0第...
RS EQU P1.2;赋值
RW EQU P1.0
E EQU P1.1
CLOCK EQU P1.4
CS EQU P1.7
OUT EQU P1.6
IN EQU P1.5
MOV 50H,#31H ;数字0 第1行第1个
MOV 51H,#35H ;第1行第2个数
MOV 52H,#30H ;第1行第3个数
MOV 54H,#31H ;位置
MOV P2, #0FFH
ORG 00H
ORG 30H
ANJIAN:JNB P2.1,PANDUAN ;按键判断
JNB P2.2, PANDUAN
SHENGYIN: MOV b,#100 ;设定数字的转换
MOV A, 50H
MUL AB
MOV 70H, A
MOV B, #10
MOV A, 51H
MUL AB
ADD A, 70H
ADD A, 52H
CJNE A,21H,XIAOYIN
CLR P2.7
LCALL DDDD
LJMP ZHUANHUAN
XIAOYIN: JC GUANBI
SETB P2.7
LJMP ZHUANHUAN
GUANBI: CLR P2.7
LCALL DDDD
LJMP ZHUANHUAN
PANDUAN: LCALL DDD
JNB P2.1, BIJIAO
JNB P2.2, BIJIAO1
LJMP ZHUANHUAN
BIJIAO: MOV R0, 54H
CJNE R0,#31H,ERWEI
MOV R0, 52H ;
CJNE R0,#39H,JIAYI
MOV 52H, #30H
LJMP ZHUANHUAN
JIAYI: INC R0
MOV 52H, R0
LJMP ZHUANHUAN
ERWEI:CJNE R0,#32H,DIYI
MOV R0, 51H ;
CJNE R0,#39H,JIAYI1
MOV 51H, #30H
LJMP ZHUANHUAN
JIAYI1: INC R0
MOV 51H, R0
LJMP ZHUANHUAN
DIYI:CJNE R0,#33H,JIAYI2
MOV R0, 50H ;
CJNE R0,#31H,JIAYI2
MOV 50H,#30H
LJMP ZHUANHUAN
JIAYI2: INC R0
MOV 50H, R0
LJMP ZHUANHUAN
BIJIAO1:MOV R0,54H
CJNE R0,#33H,YIWEI
MOV 54H, #31H
LJMP ZHUANHUAN
YIWEI: CJNE R0, #32H, YIWEI2
INC R0
MOV 54H, R0
LJMP ZHUANHUAN
YIWEI2: INC R0
MOV 54H, R0
LJMP ZHUANHUAN
ZHUANHUAN:LCALL DDDD
LCALL ZHHZ
MOV A,21H
MOV B, #10
DIV AB
MOV 40H, B
MOV B,#10
DIV AB
ADD A, #30H
MOV 38H,A
MOV A, B
ADD A, #30H
MOV 39H,A
MOV A, 40H
ADD A, #30H
MOV 3AH,A
LJMP XIANSHI
这是一部分程序 展开
RW EQU P1.0
E EQU P1.1
CLOCK EQU P1.4
CS EQU P1.7
OUT EQU P1.6
IN EQU P1.5
MOV 50H,#31H ;数字0 第1行第1个
MOV 51H,#35H ;第1行第2个数
MOV 52H,#30H ;第1行第3个数
MOV 54H,#31H ;位置
MOV P2, #0FFH
ORG 00H
ORG 30H
ANJIAN:JNB P2.1,PANDUAN ;按键判断
JNB P2.2, PANDUAN
SHENGYIN: MOV b,#100 ;设定数字的转换
MOV A, 50H
MUL AB
MOV 70H, A
MOV B, #10
MOV A, 51H
MUL AB
ADD A, 70H
ADD A, 52H
CJNE A,21H,XIAOYIN
CLR P2.7
LCALL DDDD
LJMP ZHUANHUAN
XIAOYIN: JC GUANBI
SETB P2.7
LJMP ZHUANHUAN
GUANBI: CLR P2.7
LCALL DDDD
LJMP ZHUANHUAN
PANDUAN: LCALL DDD
JNB P2.1, BIJIAO
JNB P2.2, BIJIAO1
LJMP ZHUANHUAN
BIJIAO: MOV R0, 54H
CJNE R0,#31H,ERWEI
MOV R0, 52H ;
CJNE R0,#39H,JIAYI
MOV 52H, #30H
LJMP ZHUANHUAN
JIAYI: INC R0
MOV 52H, R0
LJMP ZHUANHUAN
ERWEI:CJNE R0,#32H,DIYI
MOV R0, 51H ;
CJNE R0,#39H,JIAYI1
MOV 51H, #30H
LJMP ZHUANHUAN
JIAYI1: INC R0
MOV 51H, R0
LJMP ZHUANHUAN
DIYI:CJNE R0,#33H,JIAYI2
MOV R0, 50H ;
CJNE R0,#31H,JIAYI2
MOV 50H,#30H
LJMP ZHUANHUAN
JIAYI2: INC R0
MOV 50H, R0
LJMP ZHUANHUAN
BIJIAO1:MOV R0,54H
CJNE R0,#33H,YIWEI
MOV 54H, #31H
LJMP ZHUANHUAN
YIWEI: CJNE R0, #32H, YIWEI2
INC R0
MOV 54H, R0
LJMP ZHUANHUAN
YIWEI2: INC R0
MOV 54H, R0
LJMP ZHUANHUAN
ZHUANHUAN:LCALL DDDD
LCALL ZHHZ
MOV A,21H
MOV B, #10
DIV AB
MOV 40H, B
MOV B,#10
DIV AB
ADD A, #30H
MOV 38H,A
MOV A, B
ADD A, #30H
MOV 39H,A
MOV A, 40H
ADD A, #30H
MOV 3AH,A
LJMP XIANSHI
这是一部分程序 展开
2个回答
2012-05-04 · 知道合伙人软件行家
关注
展开全部
不会是你的代码太长,ZHUANHUAN的位置已经超过了LJMP的距离范围了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询