编程:在屏幕中间分别显示绿色,绿底红色,白底蓝色的字符串'welcometomasm!'.assumecs:codesg,ds:datasg,es:display,ss:stacksgdatasgsegmentdb'welcometomasm!';16个字节,从ds:0000开始db02h,24h,71h;分别表示绿色,绿底红色,白底蓝色,从ds:0010开始datasgendsstacksgsegmentdb16dup(0)stacksgendsdisplaysegmentdb1024dup(0);放置三行字符串的属性,ASCII码,共16*2*3displayendscodesgsegmentstart:movax,datasgmovds,ax;设置ds指向datasgmovax,0b872hmoves,ax;设置es指向屏幕中间位置的内存单元movcx,3;显示三行字符串,需循环三次movdi,0;代表颜色的地址movsi,0;代表存储字符的ASCII码和属性;................................................................;做3次外循环,每次显示一种颜色;................................................................s0:pushcxpushaxmovcx,16;循环16次将字符串送到0b872h处movbx,0;................................................................;开始16次内循环,将字符串的ASCII和属性送到0b872h处;................................................................s1:moval,[bx]moves:[si],al;先将字符的ASCII码送到低位moval,[di+10h]moves:[si+1],al;再将代表颜色的字符送到高位incbx;移到下一个字符处addsi,2;一个字符占2个字节loops1;................................................................;一行字符串输入完成,换行,输入另一行字符串;................................................................subsi,32;si归零addsi,160;换行popaxpopcxincdi;换颜色loops0movax,4c00hint21hcodesgendsendstart