找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1362|回复: 0
收起左侧

16*16点阵会飞的小鸟程序

[复制链接]
ID:213247 发表于 2017-6-21 11:22 | 显示全部楼层 |阅读模式
TIM EQU 30H
CNTA EQU 31H
CNTB EQU 32H
ORG 00H
LJMP START
ORG 0BH
LJMP T0X
ORG 0100H

START: MOV TIM,#00H
MOV CNTA,#00H
MOV CNTB,#00H
MOV TMOD,#01H
MOV TH0,#253
MOV TL0,#96
SETB TR0
SETB ET0
SETB EA
SJMP $
T0X: MOV TH0,#251
MOV TL0, #50
MOV A,CNTA
MOV P1,A
MOV DPTR,#DIGIT
MOV A,CNTB
MOV B,#16
MUL AB
ADD A,CNTA
MOV 33H,A
MOVC A,@A+DPTR
MOV P0,A
MOV A,33H
M0: MOV DPTR,#TAB
MOVC A,@A+DPTR
MOV P2,A
INC CNTA
MOV A,CNTA
CJNE A,#16, NEX
MOV CNTA,#00H
NEXT: INC TIM
MOV A,TIM
CJNE A,#10,NEX
MOV TIM , #00H
INC CNTB
MOV A,CNTB
CJNE A,#3,NEX
MOV CNTB,#00H
NEX: RETI
DIGIT: DB 1EH,64H,88H,10H,20H,60H,70H,78H
DB 7CH,0FEH,60H,90H,0B0H,90H,60H,40H
DB 00H,00H,00H,00H,80H,80H,40H,40H
DB 0C0H,40H,60H,90H,0B0H,90H,60H,40H
DB 00H,00H,00H,00H,00H,00H,80H,0C0H
DB 0C0H,0C0H,60H,90H,0B0H,90H,60H,40H
TAB: DB 40H,60H,60H,31H,2AH,24H,14H,14H
DB 12H,09H,04H,02H,01H,00H,00H,00H
DB 44H,66H,67H,37H,2FH,24H,12H,11H
DB 10H,08H,04H,02H,01H,00H,00H,00H
DB 40H,60H,60H,30H,28H,2FH,1FH,3FH
DB 7FH,0FFH,04H,06H,09H,11H,3EH,00H
END



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

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