assume cs:codesg,ss:stack,ds:data
data segment
welcome db 13,10,'hello word!',13,10,'$'
data ends
stack segment
db 128 dup(0)
stack ends
codesg segment
main:
s1:
mov cx,10
mov ah,0
int 16h
mov ah,1
cmp al,'r'
je red
cmp al,'g'
je green
cmp al,'b'
je blue
;jmp short sret
push cx
red: shl ah,1
green: shl ah,1
blue: mov bx,0b800h
mov es,bx
mov bx,1
mov cx,2000
s:
and byte ptr es:[bx],11111000b
or es:[bx],ah
add bx,2
loop s
pop cx
loop s1
mov ax,4c00h
int 21h
codesg ends
end main
键盘输入rgb,可以改变字体颜色
最新推荐文章于 2024-07-12 16:16:27 发布