仿照网上很多人的代码我用nasm写了显示汉字的代码
但是可能是我用错了方法,点阵无法显现,一行只出现了一个点,照理说应该是按照0000110,出现两个点,但是结果是只有一个点,在6的位置
org 0x8400
jmp start
TW DB 01H,00H,01H,00H,01H,20H,05H,10H,19H,00H,09H,70H,0FH,80H,38H,90H,0AH,0A0H,0CH,40H,38H,0C0H,0CBH,24H,18H,14H,08H,0CH,00H,04H,00H,00H
DB 00H,00H,00H,20H,08H,20H,08H,40H,10H,58H,2CH,0E8H,75H,08H,46H,88H,74H,48H,44H,48H,44H,08H,3CH,08H,24H,28H,00H,10H,00H,00H,00H,00h
DB 00H,40H,10H,40H,08H,40H,00H,40H,00H,40H,30H,7CH,0D3H,0C0H,10H,40H,10H,40H,14H,40H,18H,40H,10H,40H,00H,40H,00H,40H,00H,40H,00H,00H
db 08H,58H,0FH,60H,08H,90H,15H,00H,23H,0C0H,04H,40H,07H,40H,04H,40H,07H,0C0H,04H,7EH,7FH,0C0H,04H,40H,04H,40H,08H,40H,10H,40H,00H,00H
db 10H,00H,10H,00H,10H,00H,10H,70H,1CH,90H,70H,0A0H,10H,0A0H,18H,0A0H,34H,0A0H,51H,22H,91H,22H,12H,1EH,14H,00H,10H,00H,00H,00H,00H,00H
db 00H,00H,00H,00H,00H,00H,00H,0E0H,0FH,00H,01H,00H,01H,00H,01H,00H,01H,00H,01H,00H,01H,0FCH,7EH,00H,00H,00H,00H,00H,00H,00H,00H,00H
db 00H,40H,08H,40H,08H,80H,08H,9CH,11H,0E0H,31H,40H,52H,40H,94H,78H,10H,40H,10H,40H,10H,78H,10H,40H,10H,40H,00H,40H,00H,40H,00H,00H
db 00H,00H,00H,00H,00H,0F0H,0FH,00H,01H,00H,01H,00H,09H,30H,09H,0C0H,09H,00H,09H,00H,09H,00H,09H,0FCH,0FEH,00H,00H,00H,00H,00H,00H,00H
db 01H,20H,09H,40H,05H,00H,0FH,0F8H,70H,08H,4FH,0D0H,48H,80H,07H,00H,01H,0E0H,0FH,20H,09H,20H,09H,60H,09H,20H,01H,00H,01H,00H,00H,00H
start:
MOV AL,13H
MOV AH,00H
INT 10H
;输出 ‘我的计算机工作正常’--------------------
MOV AX,0A000H ;VGA写入起始段地址
MOV ES,AX ;设置传送目标段地址
CLD ;CLD指令使DF=0,正向传输字
MOV CX,9 ;连续的字数,此处“我的计算机工作正常”共9字
MOV SI,TW ;需写入汉字字模的首地址
MOV DI,320*20
DIS1:
PUSH CX ;多重循环,CX入栈
PUSH SI
PUSH DI
MOV CX,16
DISWORD1:
MOVSW
ADD DI,318 ;转到下一行字模写入位置,一个汉字16*16,故需写16行
LOOP DISWORD1
POP DI
POP SI
POP CX
ADD SI,32 ;读取下一个汉字的字模数据,由于一个汉字占用32byte,故加上32
ADD DI,10 ;开始写下一个汉字,默认写在上一个字右边
LOOP DIS1
我找了很多的例子,大多都是这样的写法,但是用的都是masm,可能我用nasm就不行莫,那该怎么改呢?
有木有人可以解答呀,哭辽,搞了好久都搞不来这种办法的文字显示,徒手画太麻烦了~