找回密码
 注册会员
更新自动建库工具PCB Footprint Expert 2024.04 Pro / Library Expert 破解版

求助好人帮我写这个汇编程序的注释

[复制链接]
admin 发表于 2012-9-3 00:46:49 | 显示全部楼层 |阅读模式

本文包含原理图、PCB、源代码、封装库、中英文PDF等资源

您需要 登录 才可以下载或查看,没有账号?注册会员

×

ORG 0000H

START:MOV R6,#05H
DANZ:LCALL DSUB
DJNZ R6,DANZ

MOV R7,#05H
PIANZ:LCALL PSUB
DJNZ R7,PIANZ
MOV R7,#05H
JIZ:LCALL JSUB
DJNZ R7,JIZ
MOV R7,#05H
ZIZ:LCALL ZSUB
DJNZ R7,ZIZ
AJMP START

DSUB:MOV R5,#00H
MOV R1,#0FEH
DSUB0:MOV DPTR,#0DFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0EFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB1
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB1
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#10H,DSUB0
MOV R1,#0FEH
DSUB1:MOV DPTR,#0EFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0DFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB1
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB1
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#20H,DSUB1
RET

PSUB:MOV R5,#00H
MOV R1,#0FEH
PSUB0:MOV DPTR,#0DFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0EFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB2
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB2
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#10H,PSUB0
MOV R1,#0FEH
PSUB1:MOV DPTR,#0EFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0DFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB2
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB2
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#20H,PSUB1
RET
JSUB:MOV R5,#00H
MOV R1,#0FEH
JSUB0:MOV DPTR,#0DFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0EFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB3
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB3
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#10H,JSUB0
MOV R1,#0FEH
JSUB1:MOV DPTR,#0EFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0DFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB3
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB3
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#20H,JSUB1
RET

ZSUB:MOV R5,#00H
MOV R1,#0FEH
ZSUB0:MOV DPTR,#0DFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0EFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB4
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB4
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#10H,ZSUB0
MOV R1,#0FEH
ZSUB1:MOV DPTR,#0EFFFH
MOV A,R1
MOVX @DPTR,A
MOV DPTR,#0DFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV DPTR,#TAB4
MOV A,R5
MOVC A,@A+DPTR
MOV DPTR,#7FFFH
MOVX @DPTR,A
INC R5
MOV A,R5
MOV DPTR,#TAB4
MOVC A,@A+DPTR
MOV DPTR,#0BFFFH
MOVX @DPTR,A
LCALL DY1MS
MOV A,R1
RL A
MOV R1,A
INC R5
CJNE R5,#20H,ZSUB1
RET

DY1MS:MOV R3,#20
L1:MOV R4,#50
DJNZ R4,$
DJNZ R3,L1
RET

TAB1:DB 00H,08H,00H,08H,1FH,0E8H,92H,48H
DB 52H,48H,32H,48H,12H,48H,1FH,0FFH
DB 12H,48H,32H,48H,52H,48H,92H,48H
DB 3FH,0C8H,10H,18H,00H,08H,00H,00H

TAB2:DB 00H,01H,00H,02H,7FH,0FCH,04H,80H
DB 04H,80H,04H,80H,04H,80H,04H,80H
DB 0FCH,80H,04H,0FFH,04H,00H,04H,00H
DB 04H,00H,0CH,00H,04H,00H,00H,00H

TAB3:DB 08H,20H,08H,0C0H,0BH,00H,0FFH,0FFH
DB 09H,01H,08H,82H,00H,04H,3FH,0F8H
DB 20H,00H,20H,00H,20H,00H,7FH,0FCH
DB 20H,02H,00H,02H,00H,0EH,00H,00H

TAB4:DB 00H,08H,00H,08H,1FH,0E8H,92H,48H
DB 52H,48H,32H,48H,12H,48H,1FH,0FFH
DB 12H,48H,32H,48H,52H,48H,92H,48H
DB 3FH,0C8H,10H,18H,00H,08H,00H,00H

END
尽量详细点的,谢谢了,我的邮箱liulu-324@163.com
*滑块验证:
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

QQ|手机版|MCU资讯论坛 ( 京ICP备18035221号-2 )|网站地图

GMT+8, 2024-11-29 17:48 , Processed in 0.048910 second(s), 10 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表