int 16h 读入缓冲区ASCII码
检测点17.1 int 16h会设置if=1
assume cs:code
code segment
start:
mov ah,0
int 16h
mov ah,1
cmp al,'r'
je red
cmp al,'g'
je green
cmp al,'b'
je blue
jmp sret
red:
shl ah,1
green:
shl ah,1
blue:
mov bx,0b800h
mov es,bx
mov si,1
mov cx,2000
s:
mov byte ptr es:[si],ah
add si,2
loop s
sret:
mov ax,4c00h
int 21h
code ends
end start