我对你的程序做了非核心的修改和注释,你可以单步调试、跟踪。
代码如下:
ORG 0000H
LJMP START
ORG 0030H
START: MOV A,#0FFH
MOV P0,A ; P0=0XFF
ANL P3,#00 ; P3=0X00
MOV R2,#200 ; R2=200(十进制)
D1: MOV R3,#248 ; R3=248
DJNZ R3,$ ; (R3)-1不等于0,跳转到当前地址,相当于延时作用
DJNZ R2,D1 ; (R2)-1不等于0,跳转到D1地址,与上面的一句形成了双重循环,可起延时作用
MOV 20H,#00H ; (20H)=0X00
l1: MOV R1,#100 ; (R1)=100
L2: MOV R6,#16 ; (R6)=16
MOV R4,#00H ; (R4)=0
MOV R0,20H ; (R0)=0X00,把内部数据(20H)地址的数据给R0
L3: MOV A,R4 ; A=0
MOV P1,A ; P1=0X00
INC R4 ; (R4)=1
MOV A,R0 ; A=0X00
MOV DPTR,#TABLE ; 把TABLE表的地址给DPTR
MOVC A,@A+DPTR ; 把表中第一个数给A,A= 0X08
MOV P0,A ; P0 = 0X08
INC R0 ; (R0)=1
MOV A,R0 ; A = 1
MOV DPTR,#TABLE ; 把TABLE表的地址给DPTR
MOVC A,@A+DPTR ; 把表中第二个数给A,A= 0X20
MOV P3,A ; P3 = 0X20
INC R0 ; (R0)=2
MOV R3,#02 ; (R3)=2
D2: MOV R5,#248 ; (R5)=248
DJNZ R5,$ ; (R5)-1不等于0,跳转到当前地址,相当于延时作用
DJNZ R3,D2 ; (R3)-1不等于0,跳转到D2地址,与上面的一句形成了双重循环,可起延时作用
MOV A,#00H ; A=0
MOV P0,A ; P0=0X00
ANL P3,#00H ; P3=0X00
DJNZ R6,L3 ; (R6)-1不等于0,跳转到L3地址上,进入循环,循环后,从L3地址到这里的注释的部分数据将会发生改变(特别要注意)
DJNZ R1,L2 ; (R1)-1不等于0,跳转到L2地址上,进入循环,循环后,从L2地址到这里的注释的部分数据将会发生改变(特别要注意)
MOV 20H,R0 ; 把R0的数据给地址20H,所以(20H)=0X20
CJNE R0,#0FFH,L1 ; 如果(R0)不等于0xff,则跳转到L1地址上,注意这里的地址偏移范围(已经把指令计算在内)在 -125 ~~ +130
LJMP START ; 否则跳转到START地址上
TABLE:
DB 08H,20H,08H,0C0H,0BH,00H,0FFH,0FFH
DB 09H,01H,08H,82H,10H,04H,13H,0F8H
DB 92H,00H,72H,00H,12H,00H,17H,0FCH
DB 32H,02H,10H,02H,00H,0EH,00H,00H
DB 01H,00H,0EH,02H,00H,0CH,0FFH,0F0H
DB 00H,00H,08H,00H,06H,00H,00H,00H
DB 7FH,0FCH,00H,00H,08H,00H,06H,00H
DB 00H,00H,0FFH,0FFH,00H,00H,00H,00H
DB 20H,00H,23H,0FFH,22H,02H,22H,0AH
DB 22H,12H,3FH,0E2H,22H,02H,22H,02H
DB 22H,02H,3FH,0E2H,22H,12H,22H,12H
DB 22H,02H,67H,0FFH,22H,00H,00H,00H
DB 08H,20H,84H,3FH,46H,40H,68H,80H
DB 09H,0FEH,09H,04H,0FFH,04H,09H,04H
DB 0BH,0FDH,09H,02H,7FH,0FCH,44H,42H
DB 44H,41H,0FFH,0FEH,40H,00H,00H,00H
DB 08H,20H,44H,20H,26H,7FH,30H,80H
DB 09H,42H,08H,41H,0FFH,0FEH,08H,82H
DB 09H,04H,3FH,0F8H,22H,00H,22H,00H
DB 43H,0FFH,46H,00H,02H,00H,00H,00H
DB 08H,20H,84H,20H,46H,7FH,60H,80H
DB 01H,04H,20H,04H,20H,04H,20H,04H
DB 20H,04H,3FH,0FCH,20H,04H,20H,04H
DB 60H,04H,20H,0CH,00H,04H,00H,00H
DB 02H,01H,42H,01H,42H,02H,42H,04H
DB 42H,08H,42H,30H,42H,0C0H,7FH,00H
DB 42H,0C0H,42H,30H,42H,08H,42H,04H
DB 0C2H,02H,46H,03H,02H,02H,00H,00H
DB 01H,02H,0EH,04H,00H,08H,0FFH,0F0H
DB 08H,0AH,10H,86H,3EH,92H,2AH,92H
DB 6AH,92H,0AAH,0FEH,2AH,92H,2AH,0B2H
DB 7EH,92H,20H,86H,00H,02H,00H,00H
END
1. 你自己好好研究吧, 反正自己研究出来的东西在知识吸收上比较好, 也才能真正地变成你自己的知识;
2. 这是一个软件思路的问题. 提示: 从右向左, 你先把字符在纸上写出来, 再通过点阵信息先读取左边的点, 放到显示缓冲区的右边; 接着读下一点阵信息, 把缓冲区向左移动, 写入新的汉字点阵信息. 注意: 在这里, 是一列一列操作的. 而从上往下是一行点阵一行行操作的.
3. 显示多个汉字, 要先把字模给提取出来, 即你程序中的DB部分; 好像你的程序中是8个汉字信息, 当多于8个时, 可以采用移动显示的方式...
别人解释是没有多大作用的,你要对着教材来看才能真正学到东西