1个回答
展开全部
data segment
string db 'a',0bh,'b',02h,'c',03h,'d',04h,'e',05h,'f',06h,'g',07h,'h',08h,'i',09h,'j',0ah
count equ ($-string)/2
data ends
code segment
assume cs:code,ds:data
start:
;清屏
MOV AX,3
INT 10H
mov ax,data
mov ds,ax
;ES为显存起始地址
mov ax,0B800H
mov es,ax
mov si,offset string
xor di,di ;DI清0
mov cx,count ;字符计数
rep movsw ;直接写显存
MOV AH,0
INT 16H
mov ax,4C00H
int 21H
code ends
end start
;数据段中每个字符后面的数就是颜色值。
string db 'a',0bh,'b',02h,'c',03h,'d',04h,'e',05h,'f',06h,'g',07h,'h',08h,'i',09h,'j',0ah
count equ ($-string)/2
data ends
code segment
assume cs:code,ds:data
start:
;清屏
MOV AX,3
INT 10H
mov ax,data
mov ds,ax
;ES为显存起始地址
mov ax,0B800H
mov es,ax
mov si,offset string
xor di,di ;DI清0
mov cx,count ;字符计数
rep movsw ;直接写显存
MOV AH,0
INT 16H
mov ax,4C00H
int 21H
code ends
end start
;数据段中每个字符后面的数就是颜色值。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询