读取hzk16,得到点阵,并显示
需要自己下载hzk16到同目录
org 100h
mov dh,79
mov dl,24
mov cx,0
mov bh,7
mov al,0
mov ah,6
int 10h
mov ax,4f02h
mov bx,105h
int 10h
mov bx,msg
mov cx,8
mov dx,0
lop:
mov ax,[bx]
push ax
push dx
call hanzi
inc bx
inc bx
inc dx
loop lop
mov ah,0
int 16h
mov ax,3
int 10h
ret
msgdb*我成功显示了汉字*
hanzi:
push bp
mov bp,sp
sub sp,32
pusha
mov ax,[bp+6]
sub ax,0a1a1h
mov bx,ax
mov cl,94
mul cl
add al,bh
adc ah,0
mov cx,32
mul cx
push dx
push ax
jmp hanzi_next
hanzi_msgdb*hzk16*,0
hanzi_next:
mov al,0
mov dx,hanzi_msg
mov ah,3dh
int 21h
mov bx,ax
mov al,0
pop dx
pop cx
mov ah,42h
int 21h
lea dx,[bp-32]
mov cx,32
mov ah,3fh
int 21h
mov ah,3eh
int 21h
mov ax,[bp+4]
mov bx,ax
mov dl,16
mul dl
mov cx,ax
mov al,bh
mul dl
mov dx,ax
mov si,16
lea di,[bp-32]
hanzi_lop2:
mov bx,[di]
xchg bl,bh
mov bp,8000h
hanzi_lop1:
test bx,bp
jz hanzi_next1
push bx
mov bh,0
mov al,07h
mov ah,0ch
int 10h
jmp hanzi_exit1
hanzi_next1:
push bx
mov bh,0
mov al,0
mov ah,0ch
int 10h
hanzi_exit1:
pop bx
inc cx
shr bp,1
jnz hanzi_lop1
sub cx,16
inc dx
inc di
inc di
dec si
jnz hanzi_lop2
popa
add sp,32
pop bp
ret 4
需要自己下载hzk16到同目录
org 100h
mov dh,79
mov dl,24
mov cx,0
mov bh,7
mov al,0
mov ah,6
int 10h
mov ax,4f02h
mov bx,105h
int 10h
mov bx,msg
mov cx,8
mov dx,0
lop:
mov ax,[bx]
push ax
push dx
call hanzi
inc bx
inc bx
inc dx
loop lop
mov ah,0
int 16h
mov ax,3
int 10h
ret
msgdb*我成功显示了汉字*
hanzi:
push bp
mov bp,sp
sub sp,32
pusha
mov ax,[bp+6]
sub ax,0a1a1h
mov bx,ax
mov cl,94
mul cl
add al,bh
adc ah,0
mov cx,32
mul cx
push dx
push ax
jmp hanzi_next
hanzi_msgdb*hzk16*,0
hanzi_next:
mov al,0
mov dx,hanzi_msg
mov ah,3dh
int 21h
mov bx,ax
mov al,0
pop dx
pop cx
mov ah,42h
int 21h
lea dx,[bp-32]
mov cx,32
mov ah,3fh
int 21h
mov ah,3eh
int 21h
mov ax,[bp+4]
mov bx,ax
mov dl,16
mul dl
mov cx,ax
mov al,bh
mul dl
mov dx,ax
mov si,16
lea di,[bp-32]
hanzi_lop2:
mov bx,[di]
xchg bl,bh
mov bp,8000h
hanzi_lop1:
test bx,bp
jz hanzi_next1
push bx
mov bh,0
mov al,07h
mov ah,0ch
int 10h
jmp hanzi_exit1
hanzi_next1:
push bx
mov bh,0
mov al,0
mov ah,0ch
int 10h
hanzi_exit1:
pop bx
inc cx
shr bp,1
jnz hanzi_lop1
sub cx,16
inc dx
inc di
inc di
dec si
jnz hanzi_lop2
popa
add sp,32
pop bp
ret 4