求会汇编的高手解释下这个程序!急用,晚上给出满意答案的给高分!(最好在每一步步骤的后面写下意义) 20
ORG00HLJMPSTARTORG0030HSHOWEQUP0SELECTEQUP2START:LCALLINITIALLOOP:MOVR5,#25LOOPR:LCAL...
ORG00H
LJMPSTART
ORG0030H
SHOWEQU P0
SELECTEQU P2
START:
LCALLINITIAL
LOOP: MOV R5, #25
LOOPR: LCALLDISPLAY
DECR5
CJNER5, #0FFH, LOOPR
MOVA, 43H
INCA
MOV43H, A
CJNEA, #60, LOOP
MOV43H, #0
INC42H
MOVA, 42H
CJNEA, #60, LOOP
MOV42H, #0
INC41H
MOVA, 41H
CJNEA, #24, LOOP
MOV41H, #0
LJMPLOOP
DISPLAY:
MOVDPTR, #SEGDATA
MOVA, 41H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #01H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #02H
MOVSHOW, A
LCALLDELAY5MS
MOVSELECT, #04H
MOVSHOW, #0BFH
LCALLDELAY5MS
MOVA, 42H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #08H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #10H
MOVSHOW, A
LCALLDELAY5MS
MOVSELECT, #20H
MOVSHOW, #0BFH
LCALLDELAY5MS
MOVA, 43H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #40H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #80H
MOVSHOW, A
LCALLDELAY5MS
RET
INITIAL:
MOV41H, #0
MOV42H, #0
MOV43H, #0
RET
DELAY5MS:
MOVR7, #10
D1: MOVR6, #248
DJNZR6, $
DJNZR7, D1
RET
SEGDATA: DB 0C0H, 0F9H,0A4H, 0B0H, 099H, 092H, 082H, 0F8H, 080H, 090H
END 展开
LJMPSTART
ORG0030H
SHOWEQU P0
SELECTEQU P2
START:
LCALLINITIAL
LOOP: MOV R5, #25
LOOPR: LCALLDISPLAY
DECR5
CJNER5, #0FFH, LOOPR
MOVA, 43H
INCA
MOV43H, A
CJNEA, #60, LOOP
MOV43H, #0
INC42H
MOVA, 42H
CJNEA, #60, LOOP
MOV42H, #0
INC41H
MOVA, 41H
CJNEA, #24, LOOP
MOV41H, #0
LJMPLOOP
DISPLAY:
MOVDPTR, #SEGDATA
MOVA, 41H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #01H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #02H
MOVSHOW, A
LCALLDELAY5MS
MOVSELECT, #04H
MOVSHOW, #0BFH
LCALLDELAY5MS
MOVA, 42H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #08H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #10H
MOVSHOW, A
LCALLDELAY5MS
MOVSELECT, #20H
MOVSHOW, #0BFH
LCALLDELAY5MS
MOVA, 43H
MOVB, #10
DIVAB
MOVCA, @A+DPTR
MOVSELECT, #40H
MOVSHOW, A
LCALLDELAY5MS
MOVA, B
MOVCA, @A+DPTR
MOVSELECT, #80H
MOVSHOW, A
LCALLDELAY5MS
RET
INITIAL:
MOV41H, #0
MOV42H, #0
MOV43H, #0
RET
DELAY5MS:
MOVR7, #10
D1: MOVR6, #248
DJNZR6, $
DJNZR7, D1
RET
SEGDATA: DB 0C0H, 0F9H,0A4H, 0B0H, 099H, 092H, 082H, 0F8H, 080H, 090H
END 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询