
汇编问题:在DOS中显示绿色的字符串'Welcome to masm',为什么我的输不出来?
assumecs:codesgcodesgsegmentstart:movax,0b800hmovbx,0movbyteptr[bx],27h;'w'的acill码mov...
assume cs:codesg
codesg segment
start:mov ax,0b800h
mov bx,0
mov byte ptr [bx],27h ;'w'的acill码
mov byte ptr[bx+1],00000010b
mov byte ptr[bx+2],57h
mov byte ptr[bx+4],65h
mov byte ptr[bx+6],6ch
mov byte ptr[bx+6],63h
mov byte ptr[bx+8],6fh
mov byte ptr[bx+10],6dh
mov byte ptr[bx+12],65h
mov byte ptr[bx+14],20h
mov byte ptr[bx+16],74h
mov byte ptr[bx+18],6fh
mov byte ptr[bx+20],20h
mov byte ptr[bx+22],6dh
mov byte ptr[bx+24],61h
mov byte ptr[bx+26],73h
mov byte ptr[bx+28],6dh
mov byte ptr[bx+30],27h
mov bx,0
mov si,1
mov cx,17
s0:mov byte ptr[bx+si],00000010b
add si,2
loop s0
mov ax,4c00h
int 21h
codesg ends
end start 展开
codesg segment
start:mov ax,0b800h
mov bx,0
mov byte ptr [bx],27h ;'w'的acill码
mov byte ptr[bx+1],00000010b
mov byte ptr[bx+2],57h
mov byte ptr[bx+4],65h
mov byte ptr[bx+6],6ch
mov byte ptr[bx+6],63h
mov byte ptr[bx+8],6fh
mov byte ptr[bx+10],6dh
mov byte ptr[bx+12],65h
mov byte ptr[bx+14],20h
mov byte ptr[bx+16],74h
mov byte ptr[bx+18],6fh
mov byte ptr[bx+20],20h
mov byte ptr[bx+22],6dh
mov byte ptr[bx+24],61h
mov byte ptr[bx+26],73h
mov byte ptr[bx+28],6dh
mov byte ptr[bx+30],27h
mov bx,0
mov si,1
mov cx,17
s0:mov byte ptr[bx+si],00000010b
add si,2
loop s0
mov ax,4c00h
int 21h
codesg ends
end start 展开
1个回答
展开全部
……
start:mov ax,0b800h
MOV DS, AX ;加上这句试试
mov bx,0
……
start:mov ax,0b800h
MOV DS, AX ;加上这句试试
mov bx,0
……
更多追问追答
追问
加上了,还不行
追答
显示出来了,是绿色的:'Wecome to masm'。
是在上面,第一行,显示的。
屏幕,如果向上滚动一下,就滚没有了。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询