8*8点阵静态显示汇编程序
org0000hljmpmainorg0030hmain:movr2,#10movdptr,#1lcalldispljmpmaindisp:movr0,#0movr1,#...
org 0000h
ljmp main
org 0030h
main:mov r2,#10
mov dptr,#1
lcall disp
ljmp main
disp:mov r0 ,#0
mov r1,#0
disp1:mov p0,r1
mov a,r0
movc a,@a+dptr
mov p2,a
inc r0
mov a,r0
ljmp disp1
DEL: MOV R1, #10
DEL1: MOV R2, #200
DEL2: MOV R3, #126
DEL3: DJNZ R3, DEL3
DJNZ R2, DEL2
DJNZ R1, DEL1
ret
TAB: DB 00H,00H,00H,00H,00H,00H,00H,00H ;
DB 00H,00H,00H,7EH,81H,81H,81H,7EH ;0
DB 00H,00H,00H,00H,00H,82H,0FFH,80H ;1
END 展开
ljmp main
org 0030h
main:mov r2,#10
mov dptr,#1
lcall disp
ljmp main
disp:mov r0 ,#0
mov r1,#0
disp1:mov p0,r1
mov a,r0
movc a,@a+dptr
mov p2,a
inc r0
mov a,r0
ljmp disp1
DEL: MOV R1, #10
DEL1: MOV R2, #200
DEL2: MOV R3, #126
DEL3: DJNZ R3, DEL3
DJNZ R2, DEL2
DJNZ R1, DEL1
ret
TAB: DB 00H,00H,00H,00H,00H,00H,00H,00H ;
DB 00H,00H,00H,7EH,81H,81H,81H,7EH ;0
DB 00H,00H,00H,00H,00H,82H,0FFH,80H ;1
END 展开
1个回答
展开全部
改动一下,你试试:
org 0000h
ljmp main
org 0030h
main:
mov r7, #0
mov dptr, #TAB
lcall disp
ljmp main
disp:
MOV P0, R7
mov a, r7
movc a, @a+dptr
mov p2, a
LCALL DEL
inc r7
CJNE R7, #8, disp
RET
DEL:
MOV R2, #10
DEL2: MOV R3, #0
DEL3: DJNZ R3, DEL3
DJNZ R2, DEL2
ret
TAB:
; DB 00H,00H,00H,00H,00H,00H,00H,00H ;
DB 00H,00H,00H,7EH,81H,81H,81H,7EH ;0
DB 00H,00H,00H,00H,00H,82H,0FFH,80H ;1
END
org 0000h
ljmp main
org 0030h
main:
mov r7, #0
mov dptr, #TAB
lcall disp
ljmp main
disp:
MOV P0, R7
mov a, r7
movc a, @a+dptr
mov p2, a
LCALL DEL
inc r7
CJNE R7, #8, disp
RET
DEL:
MOV R2, #10
DEL2: MOV R3, #0
DEL3: DJNZ R3, DEL3
DJNZ R2, DEL2
ret
TAB:
; DB 00H,00H,00H,00H,00H,00H,00H,00H ;
DB 00H,00H,00H,7EH,81H,81H,81H,7EH ;0
DB 00H,00H,00H,00H,00H,82H,0FFH,80H ;1
END
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询