大家来找找这个程序的错误
CODES SEGMENTASSUME CS:CODES
START:
mov ax,0b800h
mov es,ax
mov di,0
mov cx,2000
s1: mov es:[di],'a' ;在屏幕显示一屏'A'
mov es:[di].1,07h
inc di
inc di
loop s1
s2: mov ah,0 ;待键盘输入
int 16h
mov ah,1
cmp al,'r'
je red
cmp al,'g'
je green
cmp al,'b'
je blue
red: shl ah,1
green: shl ah,1
blue: mov bx,0b800h
mov es,bx
mov di,1
mov cx,2000
s: and es:[di],11111000b ;改变字符颜色属性
or es:[di],ah
inc di
inc di
loop s
jmp s2 ;回到S2处待键盘输入
;此处输入代码段代码
MOV AH,4CH
INT 21H
CODES ENDS
END START
程序运行后 按一下键屏幕上只剩一个字符了,S循环只是改变了字符的属性,字符怎么没有了呢???