怎样用汇编语言编写一个程序,要求文本显示下显示字符图形
怎样用汇编语言编写一个程序,要求文本显示下显示字符图形,并可在屏幕上滚动,按回车键即可返回操作系统。例如显示“清华大学”。急用,谢谢!!...
怎样用汇编语言编写一个程序,要求文本显示下显示字符图形,并可在屏幕上滚动,按回车键即可返回操作系统。例如显示“清华大学”。急用,谢谢!!
展开
2个回答
展开全部
;“清华大学”
code segment
assume cs:code, ds:code
begin: mov ax,12h
INT 10H
mov ax, 3
INT 10H
mov bx, cs
mov ds, bx
mov es, bx
lea bp, buffer
mov dx, 41h
mov cx, 8
mov bx, 1000h
mov ax, 1100h
int 10h
mov ax,0b800h
mov es,ax
mov dx,0
next:cld
mov di,dx
lea si,string
mov ah,07
mov cx,10
he:lodsb
stosw
loop he
mov ah,1
int 16h
mov ah,0
int 16h
cmp al,0dh
jz exit
add dx,2
cmp dx,140
jbe it
mov dx,0
it: jmp next
exit:
mov ah,4ch
int 21h
string db ' ABCDEFGH '
buffer db 0,40h,37h, 10h, 83h, 60h, 2Fh, 8, 13h
db 22h, 0E3h, 22h, 23h, 3 dup(22h), 40h
db 48h, 0FCh, 40h, 0F8h, 40h, 0FEh, 8, 0FCh
db 8, 0F8h, 8, 0F8h, 8, 28h, 10h, 2 dup(4)
db 2 dup(8), 18h, 29h, 4Ah, 8, 9, 1, 0FFh
db 5 dup(1), 40h, 48h, 58h, 60h, 0C0h, 40h
db 2 dup(44h), 3Ch, 0, 0FEh, 5 dup(0), 5 dup(1)
db 0FFh, 1, 3 dup(2), 2 dup(4), 8, 10h, 60h
db 5 dup(0), 4, 0FEh, 0, 2 dup(80h), 2 dup(40h)
db 20h, 10h, 0Eh, 4, 0, 22h, 2 dup(11h)
db 0, 7Fh, 40h, 80h, 1Fh, 0, 1, 0FFh, 3 dup(1)
db 5, 2, 2 dup(8), 10h, 20h, 0FEh, 2, 4
db 0E0h, 40h, 84h, 0FEh, 6 dup(0)
;****************
code ends
end begin
code segment
assume cs:code, ds:code
begin: mov ax,12h
INT 10H
mov ax, 3
INT 10H
mov bx, cs
mov ds, bx
mov es, bx
lea bp, buffer
mov dx, 41h
mov cx, 8
mov bx, 1000h
mov ax, 1100h
int 10h
mov ax,0b800h
mov es,ax
mov dx,0
next:cld
mov di,dx
lea si,string
mov ah,07
mov cx,10
he:lodsb
stosw
loop he
mov ah,1
int 16h
mov ah,0
int 16h
cmp al,0dh
jz exit
add dx,2
cmp dx,140
jbe it
mov dx,0
it: jmp next
exit:
mov ah,4ch
int 21h
string db ' ABCDEFGH '
buffer db 0,40h,37h, 10h, 83h, 60h, 2Fh, 8, 13h
db 22h, 0E3h, 22h, 23h, 3 dup(22h), 40h
db 48h, 0FCh, 40h, 0F8h, 40h, 0FEh, 8, 0FCh
db 8, 0F8h, 8, 0F8h, 8, 28h, 10h, 2 dup(4)
db 2 dup(8), 18h, 29h, 4Ah, 8, 9, 1, 0FFh
db 5 dup(1), 40h, 48h, 58h, 60h, 0C0h, 40h
db 2 dup(44h), 3Ch, 0, 0FEh, 5 dup(0), 5 dup(1)
db 0FFh, 1, 3 dup(2), 2 dup(4), 8, 10h, 60h
db 5 dup(0), 4, 0FEh, 0, 2 dup(80h), 2 dup(40h)
db 20h, 10h, 0Eh, 4, 0, 22h, 2 dup(11h)
db 0, 7Fh, 40h, 80h, 1Fh, 0, 1, 0FFh, 3 dup(1)
db 5, 2, 2 dup(8), 10h, 20h, 0FEh, 2, 4
db 0E0h, 40h, 84h, 0FEh, 6 dup(0)
;****************
code ends
end begin
参考资料: http://tieba.baidu.com/f?kz=606563482
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2009-07-07
展开全部
文本显示下,显示“清华大学”都很困难,更不必说滚动了,
如果显示ASCII码,不知怎么滚动?说的细些,或许有人能帮你.
如果显示ASCII码,不知怎么滚动?说的细些,或许有人能帮你.
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询