标签:
assume cs:code ;显示器上显示绿色、绿底红色、白底蓝色字符串‘welcome to masm!‘ data segment db ‘welcome to masm!‘ db 00000010b,00100100b,01110001b data ends code segment starts: mov ax,data mov ds,ax mov bx,0 mov ax,0b800H mov es,ax mov bp,0000H ;设置‘welcome‘的颜色 mov dl,ds:[16] mov cx,7 s1: mov al,ds:[bx] mov es:[bp],al mov es:1[bp],dl inc bx add bp,2 loop s1 ;设置‘ to‘ mov al,ds:[bx] mov es:[bp],al mov dl,00000111b inc bx add bp,2 mov dl,ds:[17] mov cx,2 s2: mov al,ds:[bx] mov es:[bp],al mov es:1[bp],dl inc bx add bp,2 loop s2 ;设置‘ masm!‘ mov al,ds:[bx] mov es:[bp],al mov dl,00000111b mov es:1[bp],dl inc bx add bp,2 mov dl,ds:[18] mov cx,5 s3: mov al,ds:[bx] mov es:[bp],al mov es:1[bp],dl inc bx add bp,2 loop s3 mov ax,4c00H int 21H code ends end starts
汇编“生活”(一)——王爽《汇编语言》实验9程序代码——改变显示器字体颜色
标签:
原文地址:http://www.cnblogs.com/yang-zcybb/p/4857946.html