请教个汇编问题
王爽书的课后题程序:
编程:在屏幕中间分别显示绿色、绿底红色、白底蓝色的字符串'welcome to masm!'。
assume cs:code
data segment
db 'welcome to masm!'
data ends
code segment
start: mov ax,data
mov ds,ax
mov ax,0b800h
mov es,ax
mov si,0
mov di,10*160+80
mov cx,16
s1: mov al,ds:[si]
mov ah,00000010B
mov es:[di],ax
inc si
inc di
inc di
loop s1
mov si,0
mov di,11*160+80
mov cx,16
s2: mov al,ds:[si]
mov ah,00100100B
mov es:[di],ax
inc si
inc di
inc di
loop s2
mov si,0
mov di,12*160+80
mov cx,16
s3: mov al,ds:[si]
mov ah,01110001B
mov es:[di],ax
inc si
inc di
inc di
loop s3
mov ax,4c00h
int 21h
code ends
end start
执行完mov es:[di],ax 为什么查看es:[di]的值不是ax啊??
[解决办法]
这个指令这时还没执行;其次你这是在视频缓冲区吧,屏幕一发生滚动什么的,内容就又变了。