| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2382 人关注过本帖
标题:求助一个用汇编语言编写的汉字显示研究程序(急用!最好附解释!)
只看楼主 加入收藏
qxr123
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-6-12
收藏
 问题点数:0 回复次数:5 
求助一个用汇编语言编写的汉字显示研究程序(急用!最好附解释!)
现在急需这个程序,会的人帮帮忙哦!谢啦!
搜索更多相关主题的帖子: 汇编语言 汉字 编写 
2008-06-12 09:43
sherry33
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-4-28
收藏
得分:0 
data segment
    s1 DB 0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0
       DB 0,0,0,3,3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0
       DB 0,0,0,3,3,0,0,0,0,3,3,3,3,3,3,3,3,0,0,0
       DB 0,0,0,3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0
       DB 0,0,0,3,3,0,3,3,3,0,0,0,0,3,3,0,0,0,0,0
       DB 0,3,3,3,3,3,3,3,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,0,3,3,0,3,3,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,3,3,0,0,3,3,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,3,3,0,0,3,3,0,0,0,0,3,3,0,0,3,3,3,0
       DB 0,0,3,3,0,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0
       DB 0,0,3,3,0,3,3,0,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,3,3,0,0,3,3,0,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,3,3,3,3,3,0,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,0,0,3,3,3,3,0,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,0,3,3,0,3,3,3,0,0,0,3,3,0,0,0,0,0,0
       DB 0,0,3,3,0,0,0,3,3,0,0,0,3,3,0,0,0,0,0,0
       DB 0,3,3,0,0,0,0,0,0,0,3,3,3,3,0,0,0,0,0,0
       DB 3,3,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0
       DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
       DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    cnt1   db 20
    cnt2   db 20
data ends
code segment
    assume cs:code, ds:data
start:
    mov ax, data
    mov ds, ax
    
    mov ah, 00h
    mov al, 04h
    int 10h
    mov ah, 0bh
    mov dh, 01h
    mov dl, 00h
    int 10h
    xor di, di
    mov ah, 0CH
    mov dx, 50
    mov cnt1, 20
LL1:
    mov cx, 50
    mov cnt2, 20
LL2:
    cmp [s1+di], 2
    jl black
    mov al, 1
    jmp rets
black:
    mov al, 0
rets:
    int 10h
    inc di
    inc cx
    dec [cnt2]
    jnz LL2
    inc dx
    dec [cnt1]
    jnz LL1

;============================
exit:
    mov ah, 7
    int 21h
    mov ah, 4ch
    int 21h
code ends
    end start
2008-06-12 11:17
qxr123
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-6-12
收藏
得分:0 
谢谢拉!我这也有一个拉!拿出来分享一下.
code segment
assume cs:code,ds:code
org 100h
main proc far
start:jmp begin
;汉字:仁
ren dw 300h,0,3c0h,0c0h,33fh,0fff0h,0f00h,0,0c00h,0,3c00h,0,0cc00h,0,0c00h,0,0c00h,0,0c00h,0,0c00h,0,0c00h,0h,0cffh,0fffch,0c00h,0,0c00h,0,0,0
;要显示的位置
row dw 50
col dw 50
off dw 36 ;每次要增加的距离
lp1num db 0
lp2num db 2
lp3num db 0 ;第3层循环的次数,最大为16
lp4num db 0
lp5num db 0
cmpnum dw 8000h
n db 1 ;设置字体大小,默认一个象素画一个点
begin:push ds
xor ax,ax
push ax
mov ax,code
mov ds,ax
;设置屏幕显示方式320*200彩色方式
MOV AH,0H
MOV AL,04H
INT 10H
MOV AH,0BH
MOV BH,0H
MOV BL,1
INT 10H
MOV AH,0BH
MOV BH,01H
MOV BL,0
INT 10H
;程序主体部分,3重循环
xianshi: ;清除屏幕
call clears
mov si,offset ren
;调用显示子程序,入口参数:si=要显示的汉字(用32个word存储的32*32的点阵)
;入口参数:col=要显示汉字的行,row=要显示汉字的列
;显示汉字:仁
call show
;call show
;循环接收键盘响应,看是否输入'+'字符
keyacc: mov ah,0
int 16h
cmp al,'q'
je exit
cmp al,'_'
je ensmall
cmp al,'+'
je enlarge
jmp keyacc
enlarge:inc n
cmp n,8
jbe gons
dec n
gons: jmp xianshi
ensmall:dec n
cmp n,1
jae goonx
inc n
goonx : jmp xianshi
;程序退出
exit:
; mov ah,01h
;int 21h
mov ah,0;恢复屏幕原来的显示方式
mov al,2;黑白方式80*25
int 10h
ret
main endp
;显示汉字子程序,入口参数:si=要显示的汉字存储区首地址(用32个word存储的16*32的点阵)
;入口参数:col=要显示汉字的行,row=要显示汉字的列
show proc near
push ax
push bx
push cx
push dx
push si
push word ptr row
push word ptr col
;mov cx,16
mov ah,0ch
mov dx,row
mov cx,col
mov lp1num,0
lp1:mov lp2num,0
mov cx,col
lp2:mov bx,[si]
mov lp3num,0
mov cmpnum,8000h
lp3:test bx,cmpnum
jz wr2
mov al,2
push dx ;保护列值以便恢复
mov lp4num,0
lp4:push cx
mov lp5num,0
lp5:int 10h
inc lp5num
inc cx
push ax
mov al,n
cmp lp5num,al
pop ax
jb lp5
ag4:inc dx
inc lp4num
pop cx
push ax
mov al,n
cmp lp4num,al
pop ax
jb lp4
jmp ag3
wr2:mov al,0
push dx ;保护列值以便恢复
lp42:push cx
mov lp5num,0
lp52:
int 10h
inc lp5num
inc cx
push ax
mov al,n
cmp lp5num,al
pop ax
jb lp52
ag42: inc dx
inc lp4num
pop cx
push ax
mov al,n
cmp lp4num,al
pop ax
jb lp42
ag3:pop dx
shr cmpnum,1
push ax
mov al,n
mov ah,0
add cx,ax
pop ax
; inc cx
inc lp3num
cmp lp3num,16
jb lp3
ag2: add si,2
inc lp2num
cmp lp2num,2
jb lp2ee
jmp ag1
lp2ee:jmp lp2
ag1:
; add dx,n
;inc dx
push ax
mov al,n
mov ah,0
add dx,ax
pop ax
inc lp1num
cmp lp1num,16
jb lp1ee
jmp exitshow
lp1ee:jmp lp1
exitshow:
mov lp2num,0
mov lp3num,0
mov lp1num,0
mov cmpnum,8000h
pop word ptr col
pop word ptr row
pop si
pop dx
pop cx
pop bx
pop ax
ret
show endp
;清除屏幕子程序
clears proc near
push ax
push bx
mov ah,0fh
int 10h
mov ah,0
int 10h
pop bx
pop ax
ret
clears endp
code ends
end start
2008-06-12 14:56
qxr123
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-6-12
收藏
得分:0 
谢谢拉!我这也有一个拉!拿出来分享一下.
code segment
assume cs:code,ds:code
org 100h
main proc far
start:jmp begin
;汉字:仁
ren dw 300h,0,3c0h,0c0h,33fh,0fff0h,0f00h,0,0c00h,0,3c00h,0,0cc00h,0,0c00h,0,0c00h,0,0c00h,0,0c00h,0,0c00h,0h,0cffh,0fffch,0c00h,0,0c00h,0,0,0
;要显示的位置
row dw 50
col dw 50
off dw 36 ;每次要增加的距离
lp1num db 0
lp2num db 2
lp3num db 0 ;第3层循环的次数,最大为16
lp4num db 0
lp5num db 0
cmpnum dw 8000h
n db 1 ;设置字体大小,默认一个象素画一个点
begin:push ds
xor ax,ax
push ax
mov ax,code
mov ds,ax
;设置屏幕显示方式320*200彩色方式
MOV AH,0H
MOV AL,04H
INT 10H
MOV AH,0BH
MOV BH,0H
MOV BL,1
INT 10H
MOV AH,0BH
MOV BH,01H
MOV BL,0
INT 10H
;程序主体部分,3重循环
xianshi: ;清除屏幕
call clears
mov si,offset ren
;调用显示子程序,入口参数:si=要显示的汉字(用32个word存储的32*32的点阵)
;入口参数:col=要显示汉字的行,row=要显示汉字的列
;显示汉字:仁
call show
;call show
;循环接收键盘响应,看是否输入'+'字符
keyacc: mov ah,0
int 16h
cmp al,'q'
je exit
cmp al,'_'
je ensmall
cmp al,'+'
je enlarge
jmp keyacc
enlarge:inc n
cmp n,8
jbe gons
dec n
gons: jmp xianshi
ensmall:dec n
cmp n,1
jae goonx
inc n
goonx : jmp xianshi
;程序退出
exit:
; mov ah,01h
;int 21h
mov ah,0;恢复屏幕原来的显示方式
mov al,2;黑白方式80*25
int 10h
ret
main endp
;显示汉字子程序,入口参数:si=要显示的汉字存储区首地址(用32个word存储的16*32的点阵)
;入口参数:col=要显示汉字的行,row=要显示汉字的列
show proc near
push ax
push bx
push cx
push dx
push si
push word ptr row
push word ptr col
;mov cx,16
mov ah,0ch
mov dx,row
mov cx,col
mov lp1num,0
lp1:mov lp2num,0
mov cx,col
lp2:mov bx,[si]
mov lp3num,0
mov cmpnum,8000h
lp3:test bx,cmpnum
jz wr2
mov al,2
push dx ;保护列值以便恢复
mov lp4num,0
lp4:push cx
mov lp5num,0
lp5:int 10h
inc lp5num
inc cx
push ax
mov al,n
cmp lp5num,al
pop ax
jb lp5
ag4:inc dx
inc lp4num
pop cx
push ax
mov al,n
cmp lp4num,al
pop ax
jb lp4
jmp ag3
wr2:mov al,0
push dx ;保护列值以便恢复
lp42:push cx
mov lp5num,0
lp52:
int 10h
inc lp5num
inc cx
push ax
mov al,n
cmp lp5num,al
pop ax
jb lp52
ag42: inc dx
inc lp4num
pop cx
push ax
mov al,n
cmp lp4num,al
pop ax
jb lp42
ag3:pop dx
shr cmpnum,1
push ax
mov al,n
mov ah,0
add cx,ax
pop ax
; inc cx
inc lp3num
cmp lp3num,16
jb lp3
ag2: add si,2
inc lp2num
cmp lp2num,2
jb lp2ee
jmp ag1
lp2ee:jmp lp2
ag1:
; add dx,n
;inc dx
push ax
mov al,n
mov ah,0
add dx,ax
pop ax
inc lp1num
cmp lp1num,16
jb lp1ee
jmp exitshow
lp1ee:jmp lp1
exitshow:
mov lp2num,0
mov lp3num,0
mov lp1num,0
mov cmpnum,8000h
pop word ptr col
pop word ptr row
pop si
pop dx
pop cx
pop bx
pop ax
ret
show endp
;清除屏幕子程序
clears proc near
push ax
push bx
mov ah,0fh
int 10h
mov ah,0
int 10h
pop bx
pop ax
ret
clears endp
code ends
end start
2008-06-12 16:00
sherry33
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-4-28
收藏
得分:0 
[bo][un]qxr123[/un] 在 2008-6-12 16:00 的发言:[/bo]

谢谢拉!我这也有一个拉!拿出来分享一下.
code segment
assume cs:code,ds:code
org 100h
main proc far
start:jmp begin
;汉字:仁
ren dw 300h,0,3c0h,0c0h,33fh,0fff0h,0f00h,0,0c00h,0,3c00h,0,0c ...

你的程序没退出吧。。。
2008-06-16 14:58
ymwjz
Rank: 1
等 级:新手上路
帖 子:14
专家分:3
注 册:2006-4-12
收藏
得分:0 
以上三个程序运行后都不能显示汉字!
2010-08-18 11:34
快速回复:求助一个用汇编语言编写的汉字显示研究程序(急用!最好附解释!)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.051820 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved